#[repr(u8)]
pub enum Register64Bit {
Show 16 variants RAX, RCX, RDX, RBX, RSP, RBP, RSI, RDI, R8, R9, R10, R11, R12, R13, R14, R15,
}
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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Contains the integer return value from a function call when using the System V Application Binary Interface (ABI) for AMD64.
Contains the third 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 System V Application Binary Interface for x86-64.
Contains the integer return value from a function call when using the Microsoft x64 Calling Convention.
Contains the first integer function argument to a function call when using the Microsoft x64 Calling Convention.
Contains the second integer function argument to a function call when using the Microsoft x64 Calling Convention.
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Contains the first 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 System V Application Binary Interface for x86-64.
Contains the fifth integer function argument to a function call when using the System V Application Binary Interface for x86-64.
Contains the sixth 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.
Contains the fourth integer function argument to a function call when using the Microsoft x64 Calling Convention.
This method returns an Ordering between self and other. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Zero-based index of this register.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.