X86-64 Instruction Encoding: Difference between revisions

m
[unchecked revision][unchecked revision]
m (→‎32/64-bit addressing: Table nr fix)
Line 424:
| style="background-color: white" colspan="4"|[r/m]
| style="background-color: white" |[[#32-bit SIB byte|SIB]]
| style="background-color: white" |[&nbsp;[[#RIP.2FEIP-relative_addressing|RIP/EIP]]]<span style="vertical-align: super">[[#Table5Note1Table8Note1|1]],[[#Table5Note2Table8Note2|2]]</span>+disp32
| style="background-color: white" colspan="6"|[r/m]
| style="background-color: white" |[[#32-bit SIB byte|SIB]]
| style="background-color: white" |[&nbsp;[[#RIP.2FEIP-relative_addressing|RIP/EIP]]]<span style="vertical-align: super">[[#Table5Note1Table8Note1|1]],[[#Table5Note2Table8Note2|2]]</span>+disp32
| style="background-color: white" colspan="2"|[r/m]
|-
Line 448:
|}
</div>
<small id="Table5Note1Table8Note1">1: In protected/compatibility mode, this is just ''disp32'', but in long mode this is ''[RIP]+disp32'' (for 64-bit addresses) or ''[EIP]+disp32'' (for 32-bit addresses).</small><br />
<small id="Table5Note2Table8Note2">2: In long mode, to encode ''disp32'' as in protected/compatibility mode, use the SIB byte.</small>
 
===== RIP/EIP-relative addressing =====
Addressing in x86-64 can be relative to the current instruction pointer value. This is indicated with the ''RIP'' (64-bit) and ''EIP'' (32-bit) instruction pointer registers, which are not otherwise exposed to the program and may not exist physically. RIP-relative addressing allows object files to be location independent.
 
 
=== SIB ===
Anonymous user