Skip to contentSkip to conversation

ATT/GAS syntax manual

DISCUSSION Mukesh Rathor 2 participants 3 messages Jul 27, 2010 – Jul 28, 2010

lore
Share & tools
lore
#0 lore raw

Hi all,

I should've asked this long ago, but better late than never.

Has anybody found a site, book, manual, or anything that explains the ATT/GAS syntax for each instruction. I'm looking for something similar to the Intel manuals, even tho it's not to that detail. Anything I find just includes few instructions, and is more assembly language prog book rather than just GAS syntax manual.

thanks,
Mukesh

#1 lore raw
Quoted 9 lines · Mukesh Rathor

Hi all,

I should've asked this long ago, but better late than never.

Has anybody found a site, book, manual, or anything that explains the ATT/GAS syntax for each instruction. I'm looking for something similar to the Intel manuals, even tho it's not to that detail. Anything I find just includes few instructions, and is more assembly language prog book rather than just GAS syntax manual.

I don't think there is such a thing. There are general rules for writing operands, effective addresses, and ordering of operands of course. If I had a specific issue with a particular instruction then I would construct an example in machine code using .byte directive in a .S file, gcc/gas it to an object file, and the objdump -d that file to see the AT&T syntax for the instruction.

-- Keir

Quoted 7 lines

thanks,
Mukesh

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw
Quoted 8 lines · On Tue, 27 Jul 2010 21:17:52 +0100 Keir Fraser <[email protected]>…

I don't think there is such a thing. There are general rules for writing operands, effective addresses, and ordering of operands of course. If I had a specific issue with a particular instruction then I would construct an example in machine code using .byte directive in a .S file, gcc/gas it to an object file, and the objdump -d that file to see the AT&T syntax for the instruction.

-- Keir

Ah, I thought so. I have similar tricks, I usually use gdb to toggle syntax between AT&T and INTEL, and figure out that way.

thanks,
Mukesh