User Guide

78 General-Purpose Programming
AMD64 Technology 24592—Rev. 3.15—November 2009
Except for far branches, all instructions that implicitly reference the stack pointer default to 64-bit
operand size in 64-bit mode. Table 3-8 on page 79 lists these instructions.
The default 64-bit operand size eliminates the need for a REX prefix with these instructions. However,
a REX prefix is still required if R8–R15 (the extended set of eight GPRs) are used as operands,
because the prefix is required to address the extended registers. Pushes and pops of 32-bit stack values
are not possible in 64-bit mode with these instructions, because there is no 32-bit operand-size
override prefix for 64-bit mode.
3.7.4 Jumps
Jump instructions provide a simple means for transferring program control from one location to
another. Jumps do not affect the procedure stack, and return instructions cannot transfer control back to
the instruction following a jump. Two general types of jump instruction are available: unconditional
(JMP) and conditional (Jcc).
There are two types of unconditional jumps (JMP):
Near Jumps—When the target address is within the current code segment.
Far Jumps—When the target address is outside the current code segment.
Although unconditional jumps can be used to change code segments, they cannot be used to change
privilege levels.
Conditional jumps (Jcc) test the state of various bits in the rFLAGS register (or rCX) and jump to a
target location based on the results of that test. Only near forms of conditional jumps are available, so
Jcc cannot be used to transfer control to another code segment.