Register64Bit

Enum Register64Bit 

Source
#[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

Source

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

Source§

fn clone(&self) -> Register64Bit

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Register64Bit

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Register64Bit

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl GeneralPurposeRegister for Register64Bit

Source§

const SystemVApplicationBinaryInterface64IntegerFunctionReturn: Self = Register64Bit::RAX

Contains the integer return value from a function call when using the System V Application Binary Interface (ABI) for AMD64.
Source§

const SystemVApplicationBinaryInterface64IntegerFunctionArgument2: Self = Register64Bit::RDX

Contains the third integer function argument to a function call when using the System V Application Binary Interface for x86-64.
Source§

const SystemVApplicationBinaryInterface64IntegerFunctionArgument3: Self = Register64Bit::RCX

Contains the fourth integer function argument to a function call when using the System V Application Binary Interface for x86-64.
Source§

const MicrosoftX64CallingConventionIntegerFunctionArgumentReturn: Self = Register64Bit::RAX

Contains the integer return value from a function call when using the Microsoft x64 Calling Convention.
Source§

const MicrosoftX64CallingConventionIntegerFunctionArgument0: Self = Register64Bit::RCX

Contains the first integer function argument to a function call when using the Microsoft x64 Calling Convention.
Source§

const MicrosoftX64CallingConventionIntegerFunctionArgument1: Self = Register64Bit::RDX

Contains the second integer function argument to a function call when using the Microsoft x64 Calling Convention.
Source§

impl Hash for Register64Bit

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Into<Register16Bit> for Register64Bit

Source§

fn into(self) -> Register16Bit

Converts this type into the (usually inferred) input type.
Source§

impl Into<Register32Bit> for Register64Bit

Source§

fn into(self) -> Register32Bit

Converts this type into the (usually inferred) input type.
Source§

impl Into<Register64Bit> for Register16Bit

Source§

fn into(self) -> Register64Bit

Converts this type into the (usually inferred) input type.
Source§

impl Into<Register64Bit> for Register32Bit

Source§

fn into(self) -> Register64Bit

Converts this type into the (usually inferred) input type.
Source§

impl Into<Register64Bit> for Register8Bit

Source§

fn into(self) -> Register64Bit

Converts this type into the (usually inferred) input type.
Source§

impl Into<Register64Bit> for RegisterHigh8BitsOf16Bits

Source§

fn into(self) -> Register64Bit

Converts this type into the (usually inferred) input type.
Source§

impl Into<Register8Bit> for Register64Bit

Source§

fn into(self) -> Register8Bit

Converts this type into the (usually inferred) input type.
Source§

impl Into<u8> for Register64Bit

Source§

fn into(self) -> u8

Converts this type into the (usually inferred) input type.
Source§

impl LowGeneralPurposeRegister for Register64Bit

Source§

const SystemVApplicationBinaryInterface64IntegerFunctionArgument0: Self = Register64Bit::RDI

Contains the first integer function argument to a function call when using the System V Application Binary Interface for x86-64.
Source§

const SystemVApplicationBinaryInterface64IntegerFunctionArgument1: Self = Register64Bit::RSI

Contains the second integer function argument to a function call when using the System V Application Binary Interface for x86-64.
Source§

const SystemVApplicationBinaryInterface64IntegerFunctionArgument4: Self = Register64Bit::R8

Contains the fifth integer function argument to a function call when using the System V Application Binary Interface for x86-64.
Source§

const SystemVApplicationBinaryInterface64IntegerFunctionArgument5: Self = Register64Bit::R9

Contains the sixth integer function argument to a function call when using the System V Application Binary Interface for x86-64.
Source§

const MicrosoftX64CallingConventionIntegerFunctionArgument2: Self = Register64Bit::R8

Contains the third integer function argument to a function call when using the Microsoft x64 Calling Convention.
Source§

const MicrosoftX64CallingConventionIntegerFunctionArgument3: Self = Register64Bit::R9

Contains the fourth integer function argument to a function call when using the Microsoft x64 Calling Convention.
Source§

impl Ord for Register64Bit

Source§

fn cmp(&self, other: &Register64Bit) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Register64Bit

Source§

fn eq(&self, other: &Register64Bit) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Register64Bit

Source§

fn partial_cmp(&self, other: &Register64Bit) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Register for Register64Bit

Source§

fn index(self) -> u8

Zero-based index of this register.
Source§

impl Copy for Register64Bit

Source§

impl Eq for Register64Bit

Source§

impl StructuralPartialEq for Register64Bit

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.