asmjit::x86::Mem Class Reference

Memory operand.

Public Types

- Public Types inherited from asmjit::Operand_

Member Functions

- Public Member Functions inherited from asmjit::BaseMem
- Public Member Functions inherited from asmjit::Operand
- Public Member Functions inherited from asmjit::Operand_

Additional Inherited Members

- Public Attributes inherited from asmjit::Operand_
- Static Public Member Functions inherited from asmjit::Operand_

Member Enumeration Documentation

x86::Mem::AdditionalBits : uint32_tenum

Additional bits of operand's signature used by x86::Mem.

x86::Mem::AddrType : uint32_tenum

Address type.

ConstantDescription
kAddrTypeDefault 

Default address type, Assembler will select the best type when necessary.

kAddrTypeAbs 

Absolute address type.

kAddrTypeRel 

Relative address type.

x86::Mem::Broadcast : uint32_tenum

Memory broadcast type.

ConstantDescription
kBroadcast1To1 

Broadcast {1to1}.

kBroadcast1To2 

Broadcast {1to2}.

kBroadcast1To4 

Broadcast {1to4}.

kBroadcast1To8 

Broadcast {1to8}.

kBroadcast1To16 

Broadcast {1to16}.

kBroadcast1To32 

Broadcast {1to32}.

kBroadcast1To64 

Broadcast {1to64}.

Constructor & Destructor Documentation

x86::Mem::Mem()constexprconstexprnoexcept

Creates a default Mem operand that points to [0].

Member Function Documentation

Mem x86::Mem::clone() constconstexprconstexprnoexcept

Clones the memory operand.

Mem x86::Mem::cloneAdjusted(int64_t off) constnoexcept

Creates a new copy of this memory operand adjusted by off.

Reg x86::Mem::baseReg() constnoexcept

Converts memory baseType and baseId to x86::Reg instance.

The memory must have a valid base register otherwise the result will be wrong.

Reg x86::Mem::indexReg() constnoexcept

Converts memory indexType and indexId to x86::Reg instance.

The memory must have a valid index register otherwise the result will be wrong.

uint32_t x86::Mem::addrType() constconstexprconstexprnoexcept

Returns the address type (see AddrType) of the memory operand.

By default, address type of newly created memory operands is always kAddrTypeDefault.

void x86::Mem::setAddrType(uint32_t addrType)noexcept

Sets the address type to addrType, see AddrType.

void x86::Mem::resetAddrType()noexcept

Resets the address type to kAddrTypeDefault.

bool x86::Mem::isAbs() constconstexprconstexprnoexcept

Tests whether the address type is kAddrTypeAbs.

void x86::Mem::setAbs()noexcept

Sets the address type to kAddrTypeAbs.

bool x86::Mem::isRel() constconstexprconstexprnoexcept

Tests whether the address type is kAddrTypeRel.

void x86::Mem::setRel()noexcept

Sets the address type to kAddrTypeRel.

bool x86::Mem::hasSegment() constconstexprconstexprnoexcept

Tests whether the memory operand has a segment override.

SReg x86::Mem::segment() constconstexprconstexprnoexcept

Returns the associated segment override as SReg operand.

uint32_t x86::Mem::segmentId() constconstexprconstexprnoexcept

Returns segment override register id, see SReg::Id.

void x86::Mem::setSegment(const SReg& seg)noexcept[1/2]

Sets the segment override to seg.

void x86::Mem::setSegment(uint32_t rId)noexcept[2/2]

Sets the segment override to id.

void x86::Mem::resetSegment()noexcept

Resets the segment override.

bool x86::Mem::hasShift() constconstexprconstexprnoexcept

Tests whether the memory operand has shift (aka scale) value.

uint32_t x86::Mem::shift() constconstexprconstexprnoexcept

Returns the memory operand's shift (aka scale) value.

void x86::Mem::setShift(uint32_t shift)noexcept

Sets the memory operand's shift (aka scale) value.

void x86::Mem::resetShift()noexcept

Resets the memory operand's shift (aka scale) value to zero.

bool x86::Mem::hasBroadcast() constconstexprconstexprnoexcept

Tests whether the memory operand has broadcast {1tox}.

uint32_t x86::Mem::getBroadcast() constconstexprconstexprnoexcept

Returns the memory operand's broadcast.

void x86::Mem::setBroadcast(uint32_t bcst)noexcept

Sets the memory operand's broadcast.

void x86::Mem::resetBroadcast()noexcept

Resets the memory operand's broadcast to none.

void BaseMem::setIndexnoexcept

Sets the index register to type and id of the given index operand.