#[repr(u8)]pub enum Register64Bit {
Show 16 variants
RAX = 0,
RCX = 1,
RDX = 2,
RBX = 3,
RSP = 4,
RBP = 5,
RSI = 6,
RDI = 7,
R8 = 8,
R9 = 9,
R10 = 10,
R11 = 11,
R12 = 12,
R13 = 13,
R14 = 14,
R15 = 15,
}Expand description
Register 0 (RAX) is defined on this enumeration but optimal encodings of it in combination with mnemonics exist and should be preferred as they increase code density.
Registers 8 to 15 when encoded decrease code density (ie they are less efficiently encoded than registers 1 to 7).
Variants§
RAX = 0
Register 0.
Contains the integer return value from a function call when using the System V Application Binary Interface (ABI) for AMD64.
Contains the integer return value from a function call when using the Microsoft x64 Calling Convention.
A scratch register (also known as a temporary or (function) caller-saved register) when using the System V Application Binary Interface (ABI) for AMD64.
RCX = 1
Register 1.
Contains the fourth integer function argument to a function call when using the System V Application Binary Interface for x86-64.
Contains the first integer function argument to a function call when using the Microsoft x64 Calling Convention.
A scratch register (also known as a temporary or (function) caller-saved register) when using the System V Application Binary Interface (ABI) for AMD64.
RDX = 2
Register 2.
Contains the third integer function argument to a function call when using the System V Application Binary Interface for x86-64.
Contains the second integer function argument to a function call when using the Microsoft x64 Calling Convention.
A scratch register (also known as a temporary or (function) caller-saved register) when using the System V Application Binary Interface (ABI) for AMD64.
When returning 128-bit integer values, contains the high bits of such as value (and RAX / SystemVApplicationBinaryInterface64IntegerFunctionReturn contains the low bits).
Useful for returning tuples of 64-bit values.
RBX = 3
Register 3.
A callee-saved register: a called function must preserve the value in this register when using the System V Application Binary Interface (ABI) for AMD64. In other words, upon returning, it should make sure the value originally in this register when the call was made is the current value of this register.
RSP = 4
Register 4.
Contains the stack pointer.
When using the System V Application Binary Interface (ABI) for AMD64, the stack moves downward and function arguments that did not fit into registers are passed on the stack in reversed order.
RBP = 5
Register 5.
A callee-saved register: a called function must preserve the value in this register when using the System V Application Binary Interface (ABI) for AMD64. In other words, upon returning, it should make sure the value originally in this register when the call was made is the current value of this register.
May contain the frame pointer; not needed for leaf functions.
RSI = 6
Register 6.
The ‘source’ operand in string instructions.
Contains the second integer function argument to a function call when using the System V Application Binary Interface for x86-64.
A scratch register (also known as a temporary or (function) caller-saved register) when using the System V Application Binary Interface (ABI) for AMD64.
RDI = 7
Register 7.
The ‘destination’ operand in string instructions.
Contains the first integer function argument to a function call when using the System V Application Binary Interface for x86-64.
A scratch register (also known as a temporary or (function) caller-saved register) when using the System V Application Binary Interface (ABI) for AMD64.
R8 = 8
Register 8.
Contains the fifth integer function argument to a function call when using the System V Application Binary Interface for x86-64.
Contains the third integer function argument to a function call when using the Microsoft x64 Calling Convention.
A scratch register (also known as a temporary or (function) caller-saved register) when using the System V Application Binary Interface (ABI) for AMD64.
R9 = 9
Register 9.
Contains the sixth integer function argument to a function call when using the System V Application Binary Interface for x86-64.
Contains the fourth integer function argument to a function call when using the Microsoft x64 Calling Convention.
A scratch register (also known as a temporary or (function) caller-saved register) when using the System V Application Binary Interface (ABI) for AMD64.
R10 = 10
Register 10.
A scratch register (also known as a temporary or (function) caller-saved register) when using the System V Application Binary Interface (ABI) for AMD64.
Contains a function’s static chain pointer (used for nested functions).
R11 = 11
Register 11.
A scratch register (also known as a temporary or (function) caller-saved register) when using the System V Application Binary Interface (ABI) for AMD64.
R12 = 12
Register 12.
A callee-saved register: a called function must preserve the value in this register when using the System V Application Binary Interface (ABI) for AMD64. In other words, upon returning, it should make sure the value originally in this register when the call was made is the current value of this register.
R13 = 13
Register 13.
A callee-saved register: a called function must preserve the value in this register when using the System V Application Binary Interface (ABI) for AMD64. In other words, upon returning, it should make sure the value originally in this register when the call was made is the current value of this register.
R14 = 14
Register 14.
A callee-saved register: a called function must preserve the value in this register when using the System V Application Binary Interface (ABI) for AMD64. In other words, upon returning, it should make sure the value originally in this register when the call was made is the current value of this register.
R15 = 15
Register 15.
A callee-saved register: a called function must preserve the value in this register when using the System V Application Binary Interface (ABI) for AMD64. In other words, upon returning, it should make sure the value originally in this register when the call was made is the current value of this register.
May also be used a ‘GOT’ pointer for relocations of location-independent code.
Implementations§
Source§impl Register64Bit
impl Register64Bit
Sourcepub const SystemVApplicationBinaryInterface64HighIntegerFunctionReturn: Self = Register64Bit::RDX
pub const SystemVApplicationBinaryInterface64HighIntegerFunctionReturn: Self = Register64Bit::RDX
When returning 128-bit integer values, contains the high bits of such as value (and RAX / SystemVApplicationBinaryInterface64IntegerFunctionReturn contains the low bits).
Useful for returning tuples of 64-bit values.
Trait Implementations§
Source§impl Clone for Register64Bit
impl Clone for Register64Bit
Source§fn clone(&self) -> Register64Bit
fn clone(&self) -> Register64Bit
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more