Struct yaxpeax_x86::long_mode::RegSpec[][src]

pub struct RegSpec { /* fields omitted */ }
Expand description

an x86_64 register, including its number and type. if fmt is enabled, name too.

use yaxpeax_x86::long_mode::{RegSpec, register_class};

assert_eq!(RegSpec::ecx().num(), 1);
assert_eq!(RegSpec::ecx().class(), register_class::D);

some registers have classes of their own, and only one member: rip, eip, rflags, and eflags.

Implementations

the register rip. this register is in the class rip, which contains only it.

the number of this register in its RegisterClass.

for many registers this is a number in the name, but for registers harkening back to x86_32, the first eight registers are rax, rcx, rdx, rbx, rsp, rbp, rsi, and rdi (or eXX for the 32-bit forms, XX for 16-bit forms).

the class of register this register is in.

this corresponds to the register’s size, but is by the register’s usage in the instruction set; rax and mm0 are the same size, but different classes (Q(word) and MM (mmx) respectively).

return a human-friendly name for this register. the returned name is the same as would be used to render this register in an instruction.

construct a RegSpec for x87 register st(num)

construct a RegSpec for xmm reg num

construct a RegSpec for ymm reg num

construct a RegSpec for zmm reg num

construct a RegSpec for qword reg num

construct a RegSpec for mask reg num

construct a RegSpec for dword reg num

construct a RegSpec for word reg num

construct a RegSpec for non-rex byte reg num

construct a RegSpec for non-rex byte reg num

return the size of this register, in bytes.

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

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

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

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 !=.

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

Serialize this value into the given Serde serializer. Read more

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

Converts the given value to a String. 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.