#[repr(u8)]
pub enum Register8Bit {
Show 16 variants
AL,
CL,
DL,
BL,
SPL,
BPL,
SIL,
DIL,
R8B,
R9B,
R10B,
R11B,
R12B,
R13B,
R14B,
R15B,
}
Expand description
Register 0 (AL
) and Register 1 (CL
) are defined on this enumeration but optimal encodings of them 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
AL
Register 0.
Contains the number of variable arguments (‘varargs’), from 0 to 8 inclusive, passed to 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 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.
CL
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.
DL
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.
BL
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.
SPL
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.
BPL
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.
SIL
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.
DIL
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.
R8B
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.
R9B
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.
R10B
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).
R11B
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.
R12B
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.
R13B
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.
R14B
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.
R15B
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.
Trait Implementations
sourceimpl Clone for Register8Bit
impl Clone for Register8Bit
sourcefn clone(&self) -> Register8Bit
fn clone(&self) -> Register8Bit
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for Register8Bit
impl Debug for Register8Bit
sourceimpl Default for Register8Bit
impl Default for Register8Bit
sourceimpl GeneralPurposeRegister for Register8Bit
impl GeneralPurposeRegister for Register8Bit
sourceconst SystemVApplicationBinaryInterface64IntegerFunctionReturn: Self = Register8Bit::AL
const SystemVApplicationBinaryInterface64IntegerFunctionReturn: Self = Register8Bit::AL
sourceconst SystemVApplicationBinaryInterface64IntegerFunctionArgument2: Self = Register8Bit::DL
const SystemVApplicationBinaryInterface64IntegerFunctionArgument2: Self = Register8Bit::DL
sourceconst SystemVApplicationBinaryInterface64IntegerFunctionArgument3: Self = Register8Bit::CL
const SystemVApplicationBinaryInterface64IntegerFunctionArgument3: Self = Register8Bit::CL
sourceconst MicrosoftX64CallingConventionIntegerFunctionArgumentReturn: Self = Register8Bit::AL
const MicrosoftX64CallingConventionIntegerFunctionArgumentReturn: Self = Register8Bit::AL
sourceconst MicrosoftX64CallingConventionIntegerFunctionArgument0: Self = Register8Bit::CL
const MicrosoftX64CallingConventionIntegerFunctionArgument0: Self = Register8Bit::CL
sourceconst MicrosoftX64CallingConventionIntegerFunctionArgument1: Self = Register8Bit::DL
const MicrosoftX64CallingConventionIntegerFunctionArgument1: Self = Register8Bit::DL
sourceimpl Hash for Register8Bit
impl Hash for Register8Bit
sourceimpl Into<Register16Bit> for Register8Bit
impl Into<Register16Bit> for Register8Bit
sourcefn into(self) -> Register16Bit
fn into(self) -> Register16Bit
sourceimpl Into<Register32Bit> for Register8Bit
impl Into<Register32Bit> for Register8Bit
sourcefn into(self) -> Register32Bit
fn into(self) -> Register32Bit
sourceimpl Into<Register64Bit> for Register8Bit
impl Into<Register64Bit> for Register8Bit
sourcefn into(self) -> Register64Bit
fn into(self) -> Register64Bit
sourceimpl Into<Register8Bit> for Register16Bit
impl Into<Register8Bit> for Register16Bit
sourcefn into(self) -> Register8Bit
fn into(self) -> Register8Bit
sourceimpl Into<Register8Bit> for Register32Bit
impl Into<Register8Bit> for Register32Bit
sourcefn into(self) -> Register8Bit
fn into(self) -> Register8Bit
sourceimpl Into<Register8Bit> for Register64Bit
impl Into<Register8Bit> for Register64Bit
sourcefn into(self) -> Register8Bit
fn into(self) -> Register8Bit
sourceimpl Into<Register8Bit> for RegisterHigh8BitsOf16Bits
impl Into<Register8Bit> for RegisterHigh8BitsOf16Bits
sourcefn into(self) -> Register8Bit
fn into(self) -> Register8Bit
sourceimpl Into<u8> for Register8Bit
impl Into<u8> for Register8Bit
sourceimpl LowGeneralPurposeRegister for Register8Bit
impl LowGeneralPurposeRegister for Register8Bit
sourceconst SystemVApplicationBinaryInterface64IntegerFunctionArgument0: Self = Register8Bit::DIL
const SystemVApplicationBinaryInterface64IntegerFunctionArgument0: Self = Register8Bit::DIL
sourceconst SystemVApplicationBinaryInterface64IntegerFunctionArgument1: Self = Register8Bit::SIL
const SystemVApplicationBinaryInterface64IntegerFunctionArgument1: Self = Register8Bit::SIL
sourceconst SystemVApplicationBinaryInterface64IntegerFunctionArgument4: Self = Register8Bit::R8B
const SystemVApplicationBinaryInterface64IntegerFunctionArgument4: Self = Register8Bit::R8B
sourceconst SystemVApplicationBinaryInterface64IntegerFunctionArgument5: Self = Register8Bit::R9B
const SystemVApplicationBinaryInterface64IntegerFunctionArgument5: Self = Register8Bit::R9B
sourceconst MicrosoftX64CallingConventionIntegerFunctionArgument2: Self = Register8Bit::R8B
const MicrosoftX64CallingConventionIntegerFunctionArgument2: Self = Register8Bit::R8B
sourceconst MicrosoftX64CallingConventionIntegerFunctionArgument3: Self = Register8Bit::R9B
const MicrosoftX64CallingConventionIntegerFunctionArgument3: Self = Register8Bit::R9B
sourceimpl Ord for Register8Bit
impl Ord for Register8Bit
sourcefn cmp(&self, other: &Register8Bit) -> Ordering
fn cmp(&self, other: &Register8Bit) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
sourceimpl PartialEq<Register8Bit> for Register8Bit
impl PartialEq<Register8Bit> for Register8Bit
sourcefn eq(&self, other: &Register8Bit) -> bool
fn eq(&self, other: &Register8Bit) -> bool
sourceimpl PartialOrd<Register8Bit> for Register8Bit
impl PartialOrd<Register8Bit> for Register8Bit
sourcefn partial_cmp(&self, other: &Register8Bit) -> Option<Ordering>
fn partial_cmp(&self, other: &Register8Bit) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more