Académique Documents
Professionnel Documents
Culture Documents
Comments
start with /* and end with */.
Addresses
ret ret
Compute the product of the two signed integer sar sar r, i | sar m, i
Perform an arithmetic right-shift on the first
operands, and store the result in the first operand.
operand, with the amount given by the second
jmp jmp label
operand. An arithmetic right-shift preserves the
Jump unconditionally to label.
sign, by filling in with the left-most (sign) bit.
je je label
Jump to label if the first operand of the preceding Perform a logical right-shift on the first operand, with
the amount given by the second operand. A logical
cmp instruction was equal to the second operand.
right-shift ignores the sign, by filling in with zero bits.
jg jg label
Jump to label if the first operand of the preceding sub sub r, i | sub r, r | sub r, m | sub m, i | sub m, r
Subtract the second operand from the first operand,
cmp instruction was > the second operand.
and store the result in the first operand.
jge jge label
The x64 instruction set has many more instrucJump to label if the first operand of the preceding
tions
than shown here. Furthermore, most of the
cmp instruction was the second operand.
instructions support more addressing modes than
listed. The reference here should suffice for our
jl jl label
Jump to label if the first operand of the preceding compiler construction project, but if you want to
learn more, see Volume 2 of the Intel 64 and IA-32
cmp instruction was < the second operand.
Architectures Software Developers Manual: http:
jle jle label
//www.intel.com/content/www/us/en/processors/
Jump to label if the first operand of the preceding architectures-software-developer-manuals.html/
c
Introduction to x64 assembly,
Martin
Hirzel 2011
Calling Conventions
%rbp 8
caller local
... variables and
%rbp frame size temporaries
%rsp + 8 * (n7)
...
arg[n1]
%rbp + 8 * (n5)
...
arg[n1]
...
%rsp + 8
arg[7]
%rbp + 24
arg[7]
%rsp
arg[6]
%rbp + 16
arg[6]
caller %rbp