IndexFunctionasmjit::FuncArgsAssignment
asmjit::FuncArgsAssignment Class Reference

A helper class that can be used to assign a physical register for each function argument.

Use with BaseEmitter::emitArgsAssignment().

Public Members

Members

Member Functions

Construction & Destruction
Overloaded Operators
Accessors
Utilities

FuncArgsAssignment::FuncArgsAssignment(
const FuncDetail* fd = nullptr
)explicitnoexcept[1/2][¶]

Creates either a default initialized FuncArgsAssignment or to assignment that links to fd, if non-null.

FuncArgsAssignment::FuncArgsAssignment(
const FuncArgsAssignment& other
)defaultnoexcept[2/2][¶]

Copy constructor.

void FuncArgsAssignment::reset(
const FuncDetail* fd = nullptr
)noexcept[¶]

Resets this FuncArgsAssignment to either default constructed state or to assignment that links to fd, if non-null.

FuncArgsAssignment& FuncArgsAssignment::operator=(
const FuncArgsAssignment& other
)defaultnoexcept[¶]

Copy assignment.

const FuncDetail* FuncArgsAssignment::funcDetail() constnoexcept[¶]

Returns the associated FuncDetail of this FuncArgsAssignment.

void FuncArgsAssignment::setFuncDetail(
const FuncDetail* fd
)noexcept[¶]

Associates FuncDetails with this FuncArgsAssignment.

FuncValue& FuncArgsAssignment::arg(
size_t argIndex,
size_t valueIndex
)noexcept[1/2][¶]

Returns assigned argument at argIndex and valueIndex.

Note
argIndex refers to he function argument and valueIndex refers to a value pack (in case multiple values are passed as a single argument).

const FuncValue& FuncArgsAssignment::arg(
size_t argIndex,
size_t valueIndex
) 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.

bool FuncArgsAssignment::isAssigned(
size_t argIndex,
size_t valueIndex
) constnoexcept[¶]

Tests whether argument at argIndex and valueIndex has been assigned.

void FuncArgsAssignment::assignReg(
size_t argIndex,
const BaseReg& reg,
)noexcept[1/2][¶]

Assigns register at argIndex and value index of 0 to reg and an optional typeId.

void FuncArgsAssignment::assignReg(
size_t argIndex,
RegType regType,
uint32_t regId,
)noexcept[2/2][¶]

Assigns register at argIndex and value index of 0 to regType, regId, and an optional typeId.

void FuncArgsAssignment::assignStack(
size_t argIndex,
int32_t offset,
)noexcept[¶]

Assigns stack at argIndex and value index of 0 to offset and an optional typeId.

void FuncArgsAssignment::assignRegInPack(
size_t argIndex,
size_t valueIndex,
const BaseReg& reg,
)noexcept[1/2][¶]

Assigns register at argIndex and valueIndex to reg and an optional typeId.

void FuncArgsAssignment::assignRegInPack(
size_t argIndex,
size_t valueIndex,
RegType regType,
uint32_t regId,
)noexcept[2/2][¶]

Assigns register at argIndex and valueIndex to regType, regId, and an optional typeId.

void FuncArgsAssignment::assignStackInPack(
size_t argIndex,
size_t valueIndex,
int32_t offset,
)noexcept[¶]

Assigns stack at argIndex and valueIndex to offset and an optional typeId.

template<typename... Args>
void FuncArgsAssignment::assignAll(
Args&&... args
)noexcept[¶]

Assigns all argument at once.

Note
This function can be only used if the arguments don't contain value packs (multiple values per argument).

Error FuncArgsAssignment::updateFuncFrame(
FuncFrame& frame
) constnoexcept[¶]

Update FuncFrame based on function's arguments assignment.

Note
This function must be called in order to use BaseEmitter::emitArgsAssignment(), otherwise the FuncFrame would not contain the information necessary to assign all arguments into the registers and/or stack specified.

const FuncDetail* FuncArgsAssignment::_funcDetail {}[¶]

Function detail.

uint8_t FuncArgsAssignment::_saRegId = uint8_t()[¶]

Register that can be used to access arguments passed by stack.

uint8_t FuncArgsAssignment::_reserved[3] {}[¶]

Reserved for future use.

FuncValuePack FuncArgsAssignment::_argPacks[Globals::kMaxFuncArgs] {}[¶]

Mapping of each function argument.