IndexInstruction DBasmjit::BaseInst

asmjit::BaseInst Class Reference [¶]

Instruction id, options, and extra_reg 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 inst_id = 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::inst_id() constnodiscardnoexcept[¶]

Returns the instruction id with modifiers.

void BaseInst::set_inst_id(
InstId inst_id
)noexcept[¶]

Sets the instruction id and modifiers from inst_id.

void BaseInst::reset_inst_id()noexcept[¶]

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

InstId BaseInst::real_id() constnodiscardnoexcept[¶]

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

InstOptions BaseInst::options() constnodiscardnoexcept[¶]

Returns instruction options associated with this instruction.

bool BaseInst::has_option() constnodiscardnoexcept[¶]

Tests whether the given instruction option is enabled.

void BaseInst::set_options()noexcept[¶]

Replaces all instruction options by the given options.

void BaseInst::add_options()noexcept[¶]

Adds instruction options provided by options.

void BaseInst::clear_options()noexcept[¶]

Clears instruction options provided by options.

void BaseInst::reset_options()noexcept[¶]

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

bool BaseInst::has_extra_reg() constnodiscardnoexcept[¶]

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::_inst_id[¶]

Instruction id with modifiers.

InstOptions BaseInst::_options[¶]

Instruction options.

RegOnly BaseInst::_extra_reg[¶]

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