IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Mojo struct

OperandMap

struct OperandMap

The part of an instruction's index map the hardware fixes for one operand.

Fields​

  • ​encoding (AddressEncoding): How fixed and avoid encode the operand's addresses.
  • ​fixed (BitLayout): The index bits the hardware fixes, each to the address bits it reaches. Every other index bit is free.
  • ​avoid (UInt64): The address bits no free index bit may reach, such as the bytes within one vector access.

Implemented traits​

AnyType, Copyable, Deinitable, Equatable, ImplicitlyCopyable, Movable, RegisterPassable, TrivialRegisterPassable, Writable

Methods​

__eq__​

def __eq__(self, other: Self) -> Bool

Returns whether two operand maps are the same.

Args:

  • ​other (Self): The map to compare with.

Returns:

Bool: True when encoding, fixed bits and avoided bits agree.

free​

def free(self, index: UInt64) -> UInt64

Returns the index bits among index the hardware leaves to the caller's addresses.

Args:

  • ​index (UInt64): The index bits an issue uses.

Returns:

UInt64: index without the fixed bits.

write_to​

def write_to(self, mut writer: T)

Writes the map as encoding fixed avoid=mask.

Args:

  • ​writer (T): The writer to write to.

Was this page helpful?