2.2.1.5 Immediates
In 64-bit mode, the typical size of immediate operands remains 32 bits. When the
operand size is 64 bits, the processor sign-extends all immediates to 64 bits prior to
their use.
Support for 64-bit immediate operands is accomplished by expanding the semantics
of the existing move (MOV reg, imm16/32) instructions. These instructions (opcodes
B8H – BFH) move 16-bits or 32-bits of immediate data (depending on the effective
operand size) into a GPR. When the effective operand size is 64 bits, these instruc-
tions can be used to load an immediate into a GPR. A REX prefix is needed to override
the 32-bit default operand size to a 64-bit operand size.
For example:
48 B8 8877665544332211 MOV RAX,1122334455667788H
64位程序的32位近跳转和调用还是用,E9 xx xx xx xx,E8 xx xx xx xx,其中xx xx xx xx是两条指令间的相对偏移。
64位程序的64位近跳转和调用是,FF 04 88 77 66 55 44 33 22 11 ,跳转到绝对地址1122334455667788。64位环境FF 04 不支持32位地址,后面都是接64位地址。
64位远跳转指令几乎没有程序使用,别纠结了。
REX.WRXB + FF /5 JMP m16:64 对应: 0100.1000 11111111 0000 0101 + m16:64
REX=0100
W 1 = 64 Bit Operand Size
R 0 = Extension of the ModR/M reg field
X 0 = Extension of the SIB index field
B 0 = Extension of the ModR/M r/m field, SIB base field, or Opcode reg field