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 CpuState<X64Arch> for X64State
impl CpuState<X64Arch> for X64State
§type DiffMask = DiffMask
type DiffMask = DiffMask
The type of the difference mask used in
CpuState::find_dataflows_masked
. Read more§fn state_byte_to_reg(byte: StateByte) -> (<X64Arch as Arch>::Reg, usize)
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
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)
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
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
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)
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
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,
)
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
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
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
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 Eq for X64State
impl StructuralPartialEq for X64State
Auto Trait Implementations§
impl Freeze for X64State
impl RefUnwindSafe for X64State
impl Send for X64State
impl Sync for X64State
impl Unpin for X64State
impl UnwindSafe for X64State
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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