liblisa::arch::x64

Struct X64State

#[repr(C, align(32))]
pub struct X64State { pub regs: Align32<[u64; 20]>, pub xmm: Xmm, pub x87: X87, pub xmm_exception_flags: u64, pub xmm_daz: u8, }
Expand description

The CPU state of the x86-64 architecture.

Fields§

§regs: Align32<[u64; 20]>

General purpose registers

§xmm: Xmm

XMM registers

§x87: X87

X87 registers

§xmm_exception_flags: u64

XMM exception flags. Defined as a separate field for better alignment.

§xmm_daz: u8

XMM Denormals-are-zero flag. Defined as a separate field for better alignment.

Trait Implementations§

§

impl Clone for X64State

§

fn clone(&self) -> X64State

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
§

impl CpuState<X64Arch> for X64State

§

type DiffMask = DiffMask

The type of the difference mask used in CpuState::find_dataflows_masked. Read more
§

fn reg(&self, reg: X64Reg) -> Value<'_>

Returns the value of reg.
§

fn modify_reg<F: FnOnce(MutValue<'_>)>( &mut self, reg: <X64Arch as Arch>::Reg, update: F, )

Modifies the value of reg using update function update. Read more
§

fn gpreg(&self, reg: GpReg) -> u64

Returns the value of reg.
§

fn set_gpreg(&mut self, reg: GpReg, value: u64)

Sets the value of reg.
§

fn flag(&self, flag: X64Flag) -> bool

Returns the value of flag.
§

fn set_flag(&mut self, flag: X64Flag, value: bool)

Sets the value of flag.
§

fn size() -> usize

Returns the size (in bytes) of the CPU state.
§

fn state_byte_to_reg(byte: StateByte) -> (<X64Arch as Arch>::Reg, usize)

Converts a state byte to a register. Inverse of CpuState::reg_to_state_byte.
§

fn reg_to_state_byte(reg: <X64Arch as Arch>::Reg, byte: usize) -> StateByte

Converts a (register, byte index) tuple to a state byte. Inverse of CpuState::state_byte_to_reg.
§

fn find_differences<F: FnMut(StateByte)>(&self, other: &Self, found: &mut F)

Enumerates over all differences between the two state pairs. Calls found for each state byte that differs between self and other. The call order is unspecified.
§

fn create_diff_mask<I: Iterator<Item = StateByte>>(items: I) -> Self::DiffMask

Creates a mask of state bytes whose differences can be ignored.
§

fn get_state_byte(&self, byte: StateByte) -> u8

Returns the value of the byte byte in the CPU state.
§

fn set_state_byte(&mut self, byte: StateByte, value: u8)

Sets the value of the byte byte in the CPU state.
§

fn state_bytes_unequal(&self, dest: StateByte, other: &Self) -> bool

Returns true if the value of the specified state byte in self is not equal to the value in other.
§

fn find_dataflows_masked<F: FnMut(StateByte)>( b: SystemStateIoPair<'_, X64Arch>, a: SystemStateIoPair<'_, X64Arch>, dest_diff_mask: &Self::DiffMask, diff_mask: &Self::DiffMask, found: &mut F, )

Enumerates over all differences between the two state pairs. Calls found for each state byte that differs between self and other. diff_mask is a hint of differences that can be ignored. Therefore, this function may call found even for state bytes that can be ignored according to diff_mask.
§

fn create<R: FnMut(A::Reg, MutValue<'_>)>(regval: R) -> Self

Creates a new CPU state using regval to determine the values of the registers. Read more
§

fn default_with_pc(pc: u64) -> Self

Creates a default state with the program counter set to pc.
§

fn state_bytes_equal(&self, dest: StateByte, other: &Self) -> bool

Returns true if the value of the specified state byte in self is equal to the value in other.
§

impl Debug for X64State

§

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

Formats the value using the given formatter. Read more
§

impl Default for X64State

§

fn default() -> Self

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

impl Display for X64State

§

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

Formats the value using the given formatter. Read more
§

impl PartialEq for X64State

§

fn eq(&self, other: &X64State) -> 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.
§

impl Eq for X64State

§

impl StructuralPartialEq for X64State

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, dst: *mut T)

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

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

§

const WITNESS: W = W::MAKE

A constant of the type witness
§

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

§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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> ToString for T
where T: Display + ?Sized,

Source§

default fn to_string(&self) -> String

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V