This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: Docs on At&T X86 asm syntax


Hello,

Gcc use AT&T syntax for inline and sourcecode in
assembler. But it is rather different from those used
by Intel in their doc.

Some opcode doesn't have the same syntax, or same
name, argument passing is different, etc..


> Where could I find a comprehensive doc on this syntax?


If you don't feel like learning AT&T syntax, then two other options would to compile with the flag "-masm=intel" or you can wrap all your inline assembly in ".intel_syntax" & ".att_syntax" pseudo-ops like this:

asm(
".intel_syntax\n\t"
"mov edx, dword *ptr* [ebp+08]\n"
...
".att_syntax")

Kelley Cook



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