logo
pub struct UsedMemory { /* private fields */ }
Expand description

A memory location used by an instruction

Implementations

Creates a new instance

Arguments
  • segment: Effective segment register or Register::None if the segment register is ignored
  • base: Base register
  • index: Index register
  • scale: 1, 2, 4 or 8
  • displacement: Displacement
  • memory_size: Memory size
  • access: Access

Creates a new instance

Arguments
  • segment: Effective segment register or Register::None if the segment register is ignored
  • base: Base register
  • index: Index register
  • scale: 1, 2, 4 or 8
  • displacement: Displacement
  • memory_size: Memory size
  • access: Access
  • address_size: Address size
  • vsib_size: VSIB size (0, 4 or 8)

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

Index scale (1, 2, 4 or 8)

Displacement

Size of location

Memory access

Address size

VSIB size (0, 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, or None 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 a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. 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 tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. 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.