IndexInstruction DBasmjit::BaseInst

asmjit::BaseInst Class Reference [¶]

Instruction id, options, and extraReg in a single structure.

This structure exists mainly to simplify analysis and validation API that requires BaseInst and Operand[] array.

Member Functions

Construction & Destruction
Instruction id and modifiers
Instruction Options
Extra Register
ARM Specific

Static Functions

Statics

BaseInst::Id : uint32_tenum[¶]

ConstantDescription
kIdNone 

Invalid or uninitialized instruction id.

kIdAbstract 

Abstract instruction (BaseBuilder and BaseCompiler).

BaseInst::BaseInst(
InstId instId = 0,
)explicitnoexcept[¶]

Creates a new BaseInst instance with id and options set.

Default values of id and options are zero, which means 'none' instruction. Such instruction is guaranteed to never exist for any architecture supported by AsmJit.

InstId BaseInst::id() constnoexcept[¶]

Returns the instruction id with modifiers.

void BaseInst::setId()noexcept[¶]

Sets the instruction id and modiiers from id.

void BaseInst::resetId()noexcept[¶]

Resets the instruction id and modifiers to zero, see kIdNone.

InstId BaseInst::realId() constnoexcept[¶]

Returns a real instruction id that doesn't contain any modifiers.

InstOptions BaseInst::options() constnoexcept[¶]

Returns instruction options associated with this instruction.

bool BaseInst::hasOption() constnoexcept[¶]

Tests whether the given instruction option is enabled.

void BaseInst::setOptions(
InstOptions options
)noexcept[¶]

Replaces all instruction options by the given options.

void BaseInst::addOptions(
InstOptions options
)noexcept[¶]

Adds instruction options provided by options.

void BaseInst::clearOptions(
InstOptions options
)noexcept[¶]

Clears instruction options provided by options.

void BaseInst::resetOptions()noexcept[¶]

Resets all instruction options to InstOptions::kNone (there will be no instruction options active after reset).

bool BaseInst::hasExtraReg() constnoexcept[¶]

Tests whether the instruction has associated an extra register.

Note
Extra registers are currently only used on X86 by AVX-512 masking such as {k} and {k}{z} and by repeated instructions to explicitly assign a virtual register that would be ECX/RCX.

InstId BaseInst::_id[¶]

Instruction id with modifiers.

InstOptions BaseInst::_options[¶]

Instruction options.

RegOnly BaseInst::_extraReg[¶]

Extra register used by the instruction (either REP register or AVX-512 selector).