- The AMD64 overview class handout
- The AMD
suite of documentation is divided into five volumes.
Most important are probably
- The System V
for AMD64 describes register usage and calling conventions.
From the manuals above I have extracted short excerpts I think
are especially useful:
I have also bundled these excerpts into a single PDF.
Architecture manuals are also
I find the Intel manuals a bit harder to read, but they do have
all the instructions in simple alphabetical order (in two volumes).
This has the advantage that if you open both manual in Adobe
you can quickly look up an instruction using the
alphabetical table of contents.
- A friendly software developer put up this table of register usage (including calling convention) for AMD64
Here are some commonly used addressing modes:
%rax == $r # similarly for other registers %eax == least significant 32 bits of %rax (presence may signal a 32-bit operation) disp(base, index, scale) == $m[base + index * scale + disp] disp(base) == $m[base + disp] label(,index,scale) == $m[label + index * scale] symbol(%rip) == relative reference to symbol in memory
Opcode suffixes are used to indicate the size of a memory operation. They are:
byte b 8 bits word w 16 bits long, double l,d 32 bits quadword q 64 bits