Intel 64 and IA-32 Architectures Software Developers Manual Volume 2B, Instruction Set Reference, N-Z

Vol. 2B B-5
INSTRUCTION FORMATS AND ENCODINGS
B.1.4.3 Encoding of Operand Size (w) Bit
The current operand-size attribute determines whether the processor is performing
16-bit, 32-bit or 64-bit operations. Within the constraints of the current operand-size
attribute, the operand-size bit (w) can be used to indicate operations on 8-bit oper-
ands or the full operand size specified with the operand-size attribute. Table B-6
shows the encoding of the w bit depending on the current operand-size attribute.
Table B-5. Encoding of reg Field When w Field is Present in Instruction
Register Specified by reg Field
During 16-Bit Data Operations
Register Specified by reg Field
During 32-Bit Data Operations
Function of w Field Function of w Field
reg When w = 0 When w = 1 reg When w = 0When w = 1
000 AL AX 000 AL EAX
001 CL CX 001 CL ECX
010 DL DX 010 DL EDX
011 BL BX 011 BL EBX
100 AH
1
SP 100 AH* ESP
101 CH
1
BP 101 CH* EBP
110 DH
1
SI 110 DH* ESI
111 BH
1
DI 111 BH* EDI
NOTES:
1. AH, CH, DH, BH can not be encoded when REX prefix is used. Such an expression defaults to the
low byte.
Table B-6. Encoding of Operand Size (w) Bit
w Bit
Operand Size When
Operand-Size Attribute is 16 Bits
Operand Size When
Operand-Size Attribute is 32 Bits
0 8 Bits 8 Bits
1 16 Bits 32 Bits