asmjit::OpRWInfo Struct Reference

Read/Write information related to a single operand, used by InstRWInfo.

Public Members

Members

Member Functions

Reset
Operand Flags
Memory Flags
Physical Register ID
Reg/Mem Information
Read & Write Masks

Member Function Documentation

void OpRWInfo::reset()noexcept[1/2]◆ 

Resets this operand information to all zeros.

void OpRWInfo::reset(OpRWFlags opFlags, uint32_t regSize, uint32_t physId = BaseReg::kIdBad)noexcept[2/2]◆ 

Resets this operand info (resets all members) and set common information to the given opFlags, regSize, and possibly physId.

OpRWFlags OpRWInfo::opFlags() constnoexcept◆ 

Returns operand flags.

bool OpRWInfo::hasOpFlag(OpRWFlags flag) constnoexcept◆ 

Tests whether operand flags contain the given flag.

void OpRWInfo::addOpFlags(OpRWFlags flags)noexcept◆ 

Adds the given flags to operand flags.

void OpRWInfo::clearOpFlags(OpRWFlags flags)noexcept◆ 

Removes the given flags from operand flags.

bool OpRWInfo::isRead() constnoexcept◆ 

Tests whether this operand is read from.

bool OpRWInfo::isWrite() constnoexcept◆ 

Tests whether this operand is written to.

bool OpRWInfo::isReadWrite() constnoexcept◆ 

Tests whether this operand is both read and write.

bool OpRWInfo::isReadOnly() constnoexcept◆ 

Tests whether this operand is read only.

bool OpRWInfo::isWriteOnly() constnoexcept◆ 

Tests whether this operand is write only.

uint32_t OpRWInfo::consecutiveLeadCount() constnoexcept◆ 

Returns the type of a lead register, which is followed by consecutive registers.

bool OpRWInfo::isRm() constnoexcept◆ 

Tests whether this operand is Reg/Mem.

Reg/Mem operands can use either register or memory.

bool OpRWInfo::isZExt() constnoexcept◆ 

Tests whether the operand will be zero extended.

bool OpRWInfo::isUnique() constnoexcept◆ 

Tests whether the operand must have allocated a unique physical id that cannot be shared with other register operands.

bool OpRWInfo::isMemFake() constnoexcept◆ 

Tests whether this is a fake memory operand, which is only used, because of encoding.

Fake memory operands do not access any memory, they are only used to encode registers.

bool OpRWInfo::isMemBaseUsed() constnoexcept◆ 

Tests whether the instruction's memory BASE register is used.

bool OpRWInfo::isMemBaseRead() constnoexcept◆ 

Tests whether the instruction reads from its BASE registers.

bool OpRWInfo::isMemBaseWrite() constnoexcept◆ 

Tests whether the instruction writes to its BASE registers.

bool OpRWInfo::isMemBaseReadWrite() constnoexcept◆ 

Tests whether the instruction reads and writes from/to its BASE registers.

bool OpRWInfo::isMemBaseReadOnly() constnoexcept◆ 

Tests whether the instruction only reads from its BASE registers.

bool OpRWInfo::isMemBaseWriteOnly() constnoexcept◆ 

Tests whether the instruction only writes to its BASE registers.

bool OpRWInfo::isMemBasePreModify() constnoexcept◆ 

Tests whether the instruction modifies the BASE register before it uses it to calculate the target address.

bool OpRWInfo::isMemBasePostModify() constnoexcept◆ 

Tests whether the instruction modifies the BASE register after it uses it to calculate the target address.

bool OpRWInfo::isMemIndexUsed() constnoexcept◆ 

Tests whether the instruction's memory INDEX register is used.

bool OpRWInfo::isMemIndexRead() constnoexcept◆ 

Tests whether the instruction reads the INDEX registers.

bool OpRWInfo::isMemIndexWrite() constnoexcept◆ 

Tests whether the instruction writes to its INDEX registers.

bool OpRWInfo::isMemIndexReadWrite() constnoexcept◆ 

Tests whether the instruction reads and writes from/to its INDEX registers.

bool OpRWInfo::isMemIndexReadOnly() constnoexcept◆ 

Tests whether the instruction only reads from its INDEX registers.

bool OpRWInfo::isMemIndexWriteOnly() constnoexcept◆ 

Tests whether the instruction only writes to its INDEX registers.

uint32_t OpRWInfo::physId() constnoexcept◆ 

Returns a physical id of the register that is fixed for this operand.

Returns BaseReg::kIdBad if any register can be used.

bool OpRWInfo::hasPhysId() constnoexcept◆ 

Tests whether physId() would return a valid physical register id.

void OpRWInfo::setPhysId(uint32_t physId)noexcept◆ 

Sets physical register id, which would be fixed for this operand.

uint32_t OpRWInfo::rmSize() constnoexcept◆ 

Returns Reg/Mem size of the operand.

void OpRWInfo::setRmSize(uint32_t rmSize)noexcept◆ 

Sets Reg/Mem size of the operand.

uint64_t OpRWInfo::readByteMask() constnoexcept◆ 

Returns read mask.

uint64_t OpRWInfo::writeByteMask() constnoexcept◆ 

Returns write mask.

uint64_t OpRWInfo::extendByteMask() constnoexcept◆ 

Returns extend mask.

void OpRWInfo::setReadByteMask(uint64_t mask)noexcept◆ 

Sets read mask.

void OpRWInfo::setWriteByteMask(uint64_t mask)noexcept◆ 

Sets write mask.

void OpRWInfo::setExtendByteMask(uint64_t mask)noexcept◆ 

Sets extend mask.

Member Data Documentation

OpRWFlags OpRWInfo::_opFlags◆ 

Read/Write flags.

uint8_t OpRWInfo::_physId◆ 

Physical register index, if required.

uint8_t OpRWInfo::_rmSize◆ 

Size of a possible memory operand that can replace a register operand.

uint8_t OpRWInfo::_consecutiveLeadCount◆ 

If non-zero, then this is a consecutive lead register, and the value describes how many registers follow.

uint8_t OpRWInfo::_reserved[1]◆ 

Reserved for future use.

uint64_t OpRWInfo::_readByteMask◆ 

Read bit-mask where each bit represents one byte read from Reg/Mem.

uint64_t OpRWInfo::_writeByteMask◆ 

Write bit-mask where each bit represents one byte written to Reg/Mem.

uint64_t OpRWInfo::_extendByteMask◆ 

Zero/Sign extend bit-mask where each bit represents one byte written to Reg/Mem.