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

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

 



thanks everyone for replies. I am referring intel sw dev manual and it is sufficient for my work. It is true intel provides instructions but when instruction support is added in gnu assembler i was sort of hoping it will be documented somewhere. However, that is not necessary because gnu syntax is quite intuitive and if  instruction is supported, it is easy to figure out how it will work by gnu syntax.

Regards
Anand


________________________________
From: LIU Hao
Sent: Wednesday, May 15, 2024 17:27
To: Segher Boessenkool
Cc: anand akhare; gcc-help@xxxxxxxxxxx
Subject: Re: official gnu as reference for x86 instructions - specifically cmpxchg

在 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





[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