RIP is the instruction pointer. That register contains the address of the next instruction to execute.
RIP-relative addressing will address some memory location relative to RIP. It usually uses a signed 32-bit displacement.
e.g. if `mov r13,[123456789]` is located at the address 41B4EC0A, then the relative 32-bit offset would be 0x123456789 - 0x41B4EC0A - 7 = 0xE1907B78.
( `- 7` because RIP is the address of the next instruction; `0xE1907B78` as bytes would be 78 7B 90 E1 )
IIRC there is also an addressing mode that accesses the first 4 GiB of the address space with a direct offset _________________
I don't know where I'm going, but I'll figure it out when I get there.
RIP is the instruction pointer. That register contains the address of the next instruction to execute.
RIP-relative addressing will address some memory location relative to RIP. It usually uses a signed 32-bit displacement.
e.g. if `mov r13,[123456789]` is located at the address 41B4EC0A, then the relative 32-bit offset would be 0x123456789 - 0x41B4EC0A - 7 = 0xE1907B78.
( `- 7` because RIP is the address of the next instruction; `0xE1907B78` as bytes would be 78 7B 90 E1 )
IIRC there is also an addressing mode that accesses the first 4 GiB of the address space with a direct offset
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum