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] |
Hi,What I really need is to be able to specify portions of ( fortran ) code in such a way that it would be possible to determine their assembly code in the compiler-generated assembly output. For C it could be done by preceding and following the desirable code segments with calls to "asm" with the parameter being a specially constructed comment - the compiler generated assembly file is searched for these comments.
David Livshin wrote:
Is there a way to inline "asm" code inside gcc-FORTRAN program?
To my knowledge not; I think there are only few Fortran compilers which handle assembler in a Fortran program and, contrary to other vendor extensions, there does not seem to be any standard way.
One way to do it is to implement the routine in C and embed the asm directives there. Otherwise one could investigate how other compilers are doing it and implement some similar in gfortran.
Other than that it would be interesting to see the code where GCC/gfortran generates significant less efficient code then hand written assembler. Maybe there is something to optimize in the compiler itself.
Tobias
-- David Livshin
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |