Struct iced_x86::UsedMemory [−][src]
pub struct UsedMemory { /* fields omitted */ }
Expand description
A memory location used by an instruction
Implementations
Creates a new instance
Arguments
segment
: Effective segment register orRegister::None
if the segment register is ignoredbase
: Base registerindex
: Index registerscale
: 1, 2, 4 or 8displacement
: Displacementmemory_size
: Memory sizeaccess
: Access
Creates a new instance
Arguments
segment
: Effective segment register orRegister::None
if the segment register is ignoredbase
: Base registerindex
: Index registerscale
: 1, 2, 4 or 8displacement
: Displacementmemory_size
: Memory sizeaccess
: Accessaddress_size
: Address sizevsib_size
: VSIB size (0
,4
or8
)
Effective segment register or Register::None
if the segment register is ignored
Base register or Register::None
if none
Index register or Register::None
if none
Displacement
Size of location
Address size
pub fn virtual_address<F>(
&self,
element_index: usize,
get_register_value: F
) -> u64 where
F: FnMut(Register, usize, usize) -> u64,
👎 Deprecated since 1.11.0: This method can panic, use try_virtual_address() instead
pub fn virtual_address<F>(
&self,
element_index: usize,
get_register_value: F
) -> u64 where
F: FnMut(Register, usize, usize) -> u64,
This method can panic, use try_virtual_address() instead
Gets the virtual address of a used memory location. See also try_virtual_address()
Panics
Panics if virtual address computation fails.
Arguments
get_register_value
: Function that returns the value of a register or the base address of a segment register.
Call-back function args
- Arg 1:
register
: Register. If it’s a segment register, the call-back should return the segment’s base address, not the segment’s register value. - Arg 2:
element_index
: Only used if it’s a vsib memory operand. This is the element index of the vector index register. - Arg 3:
element_size
: Only used if it’s a vsib memory operand. Size in bytes of elements in vector index register (4 or 8).
Gets the virtual address of a used memory location, or None
if register resolution fails.
Arguments
get_register_value
: Function that returns the value of a register or the base address of a segment register, orNone
on failure.
Call-back function args
- Arg 1:
register
: Register. If it’s a segment register, the call-back should return the segment’s base address, not the segment’s register value. - Arg 2:
element_index
: Only used if it’s a vsib memory operand. This is the element index of the vector index register. - Arg 3:
element_size
: Only used if it’s a vsib memory operand. Size in bytes of elements in vector index register (4 or 8).
Trait Implementations
Returns the “default value” for a type. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for UsedMemory
impl Send for UsedMemory
impl Sync for UsedMemory
impl Unpin for UsedMemory
impl UnwindSafe for UsedMemory
Blanket Implementations
Mutably borrows from an owned value. Read more