This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: how to inline assembler into gcc-FORTRAN program?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]