User Guide
32 General-Purpose Programming
AMD64 Technology 24592—Rev. 3.15—November 2009
Arithmetic Operations. Several forms of the add, subtract, multiply, and divide instructions use AL
or rAX implicitly. The multiply and divide instructions also use the concatenation of rDX:rAX for
double-sized results (multiplies) or quotient and remainder (divides).
Sign-Extensions. The instructions that double the size of operands by sign extension (for example,
CBW, CWDE, CDQE, CWD, CDQ, CQO) use rAX register implicitly for the operand. The CWD,
CDQ, and CQO instructions also uses the rDX register.
Special MOVs. The MOV instruction has several opcodes that implicitly use the AL or rAX register
for one operand.
String Operations. Many types of string instructions use the accumulators implicitly. Load string,
store string, and scan string instructions use AL or rAX for data and rDI or rSI for the offset of a
memory address.
I/O-Address-Space Operations. The I/O and string I/O instructions use rAX to hold data that is
received from or sent to a device located in the I/O-address space. DX holds the device I/O-address
(the port number).
Table Translations. The table translate instruction (XLATB) uses AL for an memory index and rBX
for memory base address.
Compares and Exchanges. Compare and exchange instructions (CMPXCHG) use the AL or rAX
register for one operand.
DIL
2
DI EDI RDI
2
Destination
Index
• Memory address of destination
operand for string instructions.
• Memory index for 16-bit
addresses.
BPL
2
BP EBP RBP
2
Base Pointer
• Memory address of stack-
frame base pointer.
SPL
2
SP ESP RSP
2
Stack Pointer
• Memory address of last stack
entry (top of stack).
R8B–R10B
2
R8W–R10W
2
R8D–R10D
2
R8–R10
2
None No implicit uses
R11B
2
R11W
2
R11D
2
R11
2
None
• Holds the value of RFLAGS on
SYSCALL/SYSRET.
R12B–R15B
2
R12W–R15W
2
R12D–R15D
2
R12–R15
2
None No implicit uses
Table 3-1. Implicit Uses of GPRs (continued)
Registers
1
Name Implicit Uses
Low 8-Bit 16-Bit 32-Bit 64-Bit
Note:
1. Gray-shaded registers have no implicit uses.
2. Accessible only in 64-bit mode.