inline assembler 
Author Message
 inline assembler

Hi all,

is there any possibility to insert inline assembler code in fortran
code? Maybe sb. can give me a short example, please.

I'm using intel fortran compiler v7.0 and v8.0 but couldn't find any
information in the web.

Thanks for any help,
Manfred



Thu, 20 Jul 2006 20:12:43 GMT  
 inline assembler


Quote:
> Hi all,

> is there any possibility to insert inline assembler code in fortran
> code? Maybe sb. can give me a short example, please.

> I'm using intel fortran compiler v7.0 and v8.0 but couldn't find any
> information in the web.

No, there's no useful general inline asm support in Intel Fortran.  It can
be done with C functions, with several C compilers, including Intel's and
gcc.   There is a little more such support for IA64 than for IA32.  Even
Microsoft is moving in the direction of disallowing full inline assembler in
their compilers, restricting it to a set of pseudo-asm (based on Intel SSE
intrinsics).  PGI has incorporated some of the latter in their Fortran.


Thu, 20 Jul 2006 22:36:48 GMT  
 inline assembler
Thanks a lot for your answer, and allow me question.

If I compile my source with the optin "-S" I got assembler source, is
there any possibility to assemble this code (so I can insert my asm-
code there)?

Kindly regards,
Manfred



Fri, 21 Jul 2006 17:28:50 GMT  
 inline assembler


Quote:
> Thanks a lot for your answer, and allow me question.

> If I compile my source with the optin "-S" I got assembler source, is
> there any possibility to assemble this code (so I can insert my asm-
> code there)?

Yes, this usually works with Intel compilers, and many others.  In fact,
Intel Fortran accepts both Fortran and assembler files (.asm or .s,
according to the OS).  Taking the Fortran compiler as driver should ensure
that a compatible assembler is chosen.

You may be able to make a gnu patch file, which will permit you to repeat
your modification of the asm file.



Fri, 21 Jul 2006 22:04:58 GMT  
 inline assembler

Quote:
> Yes, this usually works with Intel compilers, and many others.  In
> fact, Intel Fortran accepts both Fortran and assembler files (.asm
> or .s, according to the OS).  Taking the Fortran compiler as driver
> should ensure that a compatible assembler is chosen.

Thank you very much, I will test this today, being anxious to what will
happen :)


Sat, 22 Jul 2006 09:03:04 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Inline assembler in Topspeed C++

2. Inline Assembler on DOS

3. Modula2 and inline Assembler

4. file IO in visual c++ 6 inline assembler

5. Using inline assembler in Turbo C

6. Using Turbo C and Inline assembler

7. How does one in C++ and inline assembler ...

8. pointers and inline assembler

9. C inline assembler

10. Newbie inline assembler assignment questions

11. inline assembler?

12. Borland Inline Assembler Labels?

 

 
Powered by phpBB® Forum Software