asmjit::InstNode Class Reference
Inheritance diagram for asmjit::InstNode:
asmjit::BaseNode asmjit::FuncRetNode asmjit::InstExNode asmjit::InvokeNode asmjit::JumpNode

Instruction node.

Wraps an instruction with its options and operands.

Public Members

- Public Attributes inherited from asmjit::BaseNode

Public Types


Member Functions

Construction & Destruction
Instruction Object
Instruction Id
Instruction Options
Extra Register
Instruction Operands
- 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, InstId instId, InstOptions options, uint32_t opCount, uint32_t opCapacity = kBaseOpCapacity)noexcept◆ 

Creates a new InstNode instance.

Member Function Documentation

InstId InstNode::id() constnoexcept◆ 

Returns the instruction id, see BaseInst::Id.

InstId InstNode::realId() constnoexcept◆ 

Returns the instruction real id, see BaseInst::Id.

void InstNode::setId(InstId id)noexcept◆ 

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

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).