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 initTypeId and then continue building either register or stack.

Accessors

Member Enumeration Documentation

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.

Member Function Documentation

void FuncValue::initTypeId(TypeId typeId)noexcept◆ 

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

void FuncValue::initReg(RegType regType, uint32_t regId, TypeId typeId, uint32_t flags = 0)noexcept◆ 

Initializes this FuncValue to a register of regType, regId, and assigns its typeId and flags.

void FuncValue::initStack(int32_t offset, TypeId typeId)noexcept◆ 

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

void FuncValue::reset()noexcept◆ 

Resets the value to its unassigned state.

void FuncValue::assignRegData(RegType regType, uint32_t regId)noexcept◆ 

Assigns a register of regType and regId.

void FuncValue::assignStackOffset(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::hasFlag(uint32_t flag) constnoexcept◆ 

Tests whether the FuncValue has a flag flag set.

void FuncValue::addFlags(uint32_t flags)noexcept◆ 

Adds flags to FuncValue.

void FuncValue::clearFlags(uint32_t flags)noexcept◆ 

Clears flags of FuncValue.

bool FuncValue::isInitialized() constnoexcept◆ 

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

bool FuncValue::isReg() constnoexcept◆ 

Tests whether the argument is passed by register.

bool FuncValue::isStack() constnoexcept◆ 

Tests whether the argument is passed by stack.

bool FuncValue::isAssigned() constnoexcept◆ 

Tests whether the argument is passed by register.

bool FuncValue::isIndirect() constnoexcept◆ 

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

bool FuncValue::isDone() constnoexcept◆ 

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

RegType FuncValue::regType() constnoexcept◆ 

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

void FuncValue::setRegType(RegType regType)noexcept◆ 

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

uint32_t FuncValue::regId() constnoexcept◆ 

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

void FuncValue::setRegId(uint32_t regId)noexcept◆ 

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

int32_t FuncValue::stackOffset() constnoexcept◆ 

Returns a stack offset of this argument.

void FuncValue::setStackOffset(int32_t offset)noexcept◆ 

Sets a stack offset of this argument.

bool FuncValue::hasTypeId() constnoexcept◆ 

Tests whether the argument or return value has associated TypeId.

TypeId FuncValue::typeId() constnoexcept◆ 

Returns a TypeId of this argument or return value.

void FuncValue::setTypeId(TypeId typeId)noexcept◆ 

Sets a TypeId of this argument or return value.