Re: official gnu as reference for x86 instructions - specifically cmpxchg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



在 2024-05-15 19:39, Segher Boessenkool 写道:
The source code of GAS (well, libopcodes) is the ultimate reference to
what instruction syntax is accepted by GAS.  See
https://sourceware.org/git/?p=binutils-gdb.git;a=blob&f=opcodes/i386-opc.tbl
and files around that.

Having read that page, I don't see any syntax construction about CMPXCHG. Given the fact that CMPXCHG looks much similar to MOV, it's reasonable to assume the same convention as MOV; and it is the case.

I don't recommend reading the source code. Both dialects have not been well defined, and both contain a lot of ad-hoc solutions to non-issues, e.g. why is there the `OFFSET` keyword in Intel syntax, and why is `jmp *%rax` not `jmp (%rax)` in AT&T syntax. Compiler output is really the only thing worth reading.


--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux