IndexFunctionasmjit::FuncValue

asmjit::FuncValue Struct Reference [¶]

Argument or return value (or its part) as defined by FuncSignature, but with register or stack address (and other metadata) assigned.

Public Members

Members

Public Types

Constants

Member Functions

Initialization & Reset

These initialize the whole FuncValue to either register or stack. Useful when you know all of these properties and wanna just set it up.

Assign

These initialize only part of FuncValue, useful when building FuncValue incrementally. The caller should first init the type-id by calling init_type_id and then continue building either register or stack.

Accessors

FuncValue::Bits : uint32_tenum[¶]

ConstantDescription
kTypeIdShift 

TypeId shift.

kTypeIdMask 

TypeId mask.

kFlagIsReg 

Passed by register.

kFlagIsStack 

Passed by stack.

kFlagIsIndirect 

Passed indirectly by reference (internally a pointer).

kFlagIsDone 

Used internally by arguments allocator.

kStackOffsetShift 

Stack offset shift.

kStackOffsetMask 

Stack offset mask (must occupy MSB bits).

kRegIdShift 

RegId shift.

kRegIdMask 

RegId mask.

kRegTypeShift 

RegType shift.

kRegTypeMask 

RegType mask.

void FuncValue::init_type_id(
TypeId type_id
)noexcept[¶]

Initializes this FuncValue only to the type_id provided - the rest of the values will be cleared.

void FuncValue::init_reg(
RegType reg_type,
uint32_t reg_id,
TypeId type_id,
uint32_t flags = 0
)noexcept[¶]

Initializes this FuncValue to a register of reg_type, reg_id, and assigns its type_id and flags.

void FuncValue::init_stack(
int32_t offset,
TypeId type_id
)noexcept[¶]

Initializes this FuncValue to a stack at the given offset and assigns its type_id.

void FuncValue::reset()noexcept[¶]

Resets the value to its unassigned state.

void FuncValue::assign_reg_data(
RegType reg_type,
uint32_t reg_id
)noexcept[¶]

Assigns a register of reg_type and reg_id.

void FuncValue::assign_stack_offset(
int32_t offset
)noexcept[¶]

Assigns a stack location at offset.

FuncValue::operator bool() constexplicitnoexcept[¶]

Returns true if the value is initialized (explicit bool cast).

bool FuncValue::has_flag(
uint32_t flag
) constnodiscardnoexcept[¶]

Tests whether the FuncValue has a flag flag set.

void FuncValue::add_flags(
uint32_t flags
)noexcept[¶]

Adds flags to FuncValue.

void FuncValue::clear_flags(
uint32_t flags
)noexcept[¶]

Clears flags of FuncValue.

bool FuncValue::is_initialized() constnodiscardnoexcept[¶]

Tests whether the value is initialized (i.e. contains a valid data).

bool FuncValue::is_reg() constnodiscardnoexcept[¶]

Tests whether the argument is passed by register.

bool FuncValue::is_stack() constnodiscardnoexcept[¶]

Tests whether the argument is passed by stack.

bool FuncValue::is_assigned() constnodiscardnoexcept[¶]

Tests whether the argument is passed by register.

bool FuncValue::is_indirect() constnodiscardnoexcept[¶]

Tests whether the argument is passed through a pointer (used by WIN64 to pass XMM|YMM|ZMM).

bool FuncValue::is_done() constnodiscardnoexcept[¶]

Tests whether the argument was already processed (used internally).

RegType FuncValue::reg_type() constnodiscardnoexcept[¶]

Returns a register type of the register used to pass function argument or return value.

void FuncValue::set_reg_type(
RegType reg_type
)noexcept[¶]

Sets a register type of the register used to pass function argument or return value.

uint32_t FuncValue::reg_id() constnodiscardnoexcept[¶]

Returns a physical id of the register used to pass function argument or return value.

void FuncValue::set_reg_id(
uint32_t reg_id
)noexcept[¶]

Sets a physical id of the register used to pass function argument or return value.

int32_t FuncValue::stack_offset() constnodiscardnoexcept[¶]

Returns a stack offset of this argument.

void FuncValue::set_stack_offset(
int32_t offset
)noexcept[¶]

Sets a stack offset of this argument.

bool FuncValue::has_type_id() constnodiscardnoexcept[¶]

Tests whether the argument or return value has associated TypeId.

TypeId FuncValue::type_id() constnodiscardnoexcept[¶]

Returns a TypeId of this argument or return value.

void FuncValue::set_type_id(
TypeId type_id
)noexcept[¶]

Sets a TypeId of this argument or return value.