Anonymous user
X86-64 Instruction Encoding: Difference between revisions
→REX prefix: Moved to 'Opcode'
[unchecked revision] | [unchecked revision] |
(→Opcode: New version) |
(→REX prefix: Moved to 'Opcode') |
||
Line 101:
NASM determines the operand size by looking at the ''MODRM.reg'' or (for a register) ''MODRM.rm'' fields. When they are both 32-bit, the operand size becomes 32-bit. Same for 16-bit and 64-bit. When they differ, an error occurs at compile time.
The address size is determined by looking at (for a memory operand) the ''MODRM.rm'' field, or the ''SIB.base'', ''SIB.index'' and displacement, in that order. So when ''SIB.base'' uses a 16-bit register (such as AX), the address size becomes 16-bit. Using a 32-bit displacement will result in the displacement being truncated.
== Opcode ==
|