Enum zydis::RegisterClass

source ·
#[repr(C)]
pub enum RegisterClass {
Show 20 variants INVALID = 0, GPR8 = 1, GPR16 = 2, GPR32 = 3, GPR64 = 4, X87 = 5, MMX = 6, XMM = 7, YMM = 8, ZMM = 9, TMM = 10, FLAGS = 11, IP = 12, SEGMENT = 13, TABLE = 14, TEST = 15, CONTROL = 16, DEBUG = 17, MASK = 18, BOUND = 19,
}
Expand description

Defines the ZydisRegisterClass enum.

Variants§

§

INVALID = 0

§

GPR8 = 1

8-bit general-purpose registers.

§

GPR16 = 2

16-bit general-purpose registers.

§

GPR32 = 3

32-bit general-purpose registers.

§

GPR64 = 4

64-bit general-purpose registers.

§

X87 = 5

Floating point legacy registers.

§

MMX = 6

Floating point multimedia registers.

§

XMM = 7

128-bit vector registers.

§

YMM = 8

256-bit vector registers.

§

ZMM = 9

512-bit vector registers.

§

TMM = 10

Matrix registers.

§

FLAGS = 11

Matrix registers.

§

IP = 12

Instruction-pointer registers.

§

SEGMENT = 13

Segment registers.

§

TABLE = 14

Table registers.

§

TEST = 15

Test registers.

§

CONTROL = 16

Control registers.

§

DEBUG = 17

Debug registers.

§

MASK = 18

Mask registers.

§

BOUND = 19

Bound registers.

Implementations§

source§

impl RegisterClass

source

pub fn encode(self, id: u8) -> Register

Returns the register specified by this register class and id.

§Examples
use zydis::{Register, RegisterClass};
let eax = RegisterClass::GPR32.encode(0);
assert_eq!(Register::EAX, eax);
source

pub fn width(self, mode: MachineMode) -> RegisterWidth

Returns the width of the specified register-class.

Trait Implementations§

source§

impl Clone for RegisterClass

source§

fn clone(&self) -> RegisterClass

Returns a copy 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 RegisterClass

source§

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

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

impl<'de> Deserialize<'de> for RegisterClass

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Hash for RegisterClass

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 PartialEq for RegisterClass

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for RegisterClass

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for RegisterClass

source§

impl Eq for RegisterClass

source§

impl StructuralPartialEq for RegisterClass

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> 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,

§

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>,

§

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>,

§

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.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,