asmjit::InstNode Class Reference

Instruction node.

Wraps an instruction with its options and operands.

Public Members

- Public Attributes inherited from asmjit::BaseNode

Public Types

- Public Types inherited from asmjit::BaseNode

Member Functions

Construction & Destruction
- Public Member Functions inherited from asmjit::BaseNode

Member Enumeration Documentation

anonymous enum : uint32_t


Count of embedded operands per InstNode that are always allocated as a part of the instruction.

Minimum embedded operands is 4, but in 32-bit more pointers are smaller and we can embed 5. The rest (up to 6 operands) is always stored in InstExNode.

Constructor & Destructor Documentation

InstNode::InstNode(BaseBuilder* cb, uint32_t instId, uint32_t options, uint32_t opCount, uint32_t opCapacity = kBaseOpCapacity)noexcept

Creates a new InstNode instance.

Member Function Documentation

uint32_t InstNode::id() constnoexcept

Returns the instruction id, see BaseInst::Id.

void InstNode::setId(uint32_t id)noexcept

Sets the instruction id to id, see BaseInst::Id.

uint32_t InstNode::instOptions() constnoexcept

Returns instruction options.

void InstNode::setInstOptions(uint32_t options)noexcept

Sets instruction options.

void InstNode::addInstOptions(uint32_t options)noexcept

Adds instruction options.

void InstNode::clearInstOptions(uint32_t options)noexcept

Clears instruction options.

bool InstNode::hasExtraReg() constnoexcept

Tests whether the node has an extra register operand.

RegOnly& InstNode::extraReg()noexcept[1/2]

Returns extra register operand.

const RegOnly& InstNode::extraReg() constnoexcept[2/2]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void InstNode::setExtraReg(const BaseReg& reg)noexcept[1/2]

Sets extra register operand to reg.

void InstNode::setExtraReg(const RegOnly& reg)noexcept[2/2]

Sets extra register operand to reg.

void InstNode::resetExtraReg()noexcept

Resets extra register operand.

uint32_t InstNode::opCount() constnoexcept

Returns operand count.

uint32_t InstNode::opCapacity() constnoexcept

Returns operand capacity.

void InstNode::setOpCount(uint32_t opCount)noexcept

Sets operand count.

Operand* InstNode::operands()noexcept[1/2]

Returns operands array.

const Operand* InstNode::operands() constnoexcept[2/2]

Returns operands array (const).

Operand& InstNode::op(uint32_t index)noexcept[1/2]

Returns operand at the given index.

const Operand& InstNode::op(uint32_t index) constnoexcept[2/2]

Returns operand at the given index (const).

void InstNode::setOp(uint32_t index, const Operand_& op)noexcept

Sets operand at the given index to op.

void InstNode::resetOp(uint32_t index)noexcept

Resets operand at the given index to none.

void InstNode::resetOpRange(uint32_t start, uint32_t end)noexcept

Resets operands at [start, end) range.

Member Data Documentation

BaseInst InstNode::_baseInst

Base instruction data.

Operand_ InstNode::_opArray[kBaseOpCapacity]

First 4 or 5 operands (indexed from 0).