This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: how to inline assembler into gcc-FORTRAN program?
- From: "Daniel Franke" <franke dot daniel at gmail dot com>
- To: "David Livshin" <david dot livshin at dalsoft dot com>
- Cc: "Tobias Burnus" <burnus at net-b dot de>, fortran at gcc dot gnu dot org
- Date: Wed, 25 Jul 2007 10:49:50 +0200
- Subject: Re: how to inline assembler into gcc-FORTRAN program?
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UvbSmQCbqiqksvI3oWFGsl+iod9Ws302G4OdFJTKmrX4OiZAc8nUMVSPNXJQVz3RSB2I7Asymdz8j/a/3GkhFFe4kD99msTiBKkWTcCDfa6AIW7FYdtIm1v/mxbjA57m67UBrnbDlZ9OH9Pz5q7QBIn1LXjE4tl86zqpiG2Jf/8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=oupCM6RxitfNmS2eDT7hgDjGWIVPSaxChn5U/2PVym26nqdmHkhRym+DhNYikoFyUvtQ5Vn0zKUo+Y6wxUMZImc8vHdM+QbxyvKRy9Kbm/xCFMP77sA5gtPra8pP0gjoSntrlMxW9xMvD393zIugvaSTKWqJZHG5v6qXzHT7N9E=
- References: <4642CC6A.4030603@dalsoft.com> <4642D0B4.9000403@net-b.de> <46A70C98.8060806@dalsoft.com>
2007/7/25, David Livshin <david.livshin@dalsoft.com>:
Any ideas how can it be done in gfortran?
Create a C-function
asm_marker() {
/* your asm code here */
}
In Fortran:
CALL asm_marker_()
! your fortran code here
CALL asm_marker_()
(Or use the new C binding feature to omit the decorating '_')
This also adds the function call to asm_marker() to your marker code,
but if you only want to identify a region of assembler code, that
shouldn't make a difference.
Regards
Daniel