__asm in linux?

Started by
1 comment, last by gimp 23 years, 1 month ago
I''m building a math library and for a few things have used assembler. This library is to be cross platform so how do I (in general) get this to compile under say gcc (thats the most popular linux compiler isn''t it?)? Does gcc use __asm {} to denote a asm block? IT the syntax in this block the same? Should I abandon asm for cross playform code? Many thanks
Chris Brodie
Advertisement
I know I''m gonna get flamed for this, but....inline assembly in GCC is horrible. Have fun dealing with ''input'', ''output'', and ''modified'' fields. Anyway, the syntax is....
  __asm__("    blah  \n\t    do_stuff \n\t    do_more_stuff \n\t    "    : outputs    : inputs    : modified);  


I would recommend you check out some docs such as these.

Martee
Magnum Games.NET
All your code are belong to us.
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
You should CERTAINLY abondon asm for cross platform applications. ASM isn''t portable at all!

This topic is closed to new replies.

Advertisement