asmjit::FuncDetail Class Reference

Function detail - CallConv and expanded FuncSignature.

Function detail is architecture and OS dependent representation of a function. It contains calling convention and expanded function signature so all arguments have assigned either register type & id or stack address.

Public Members

Public Types

Member Functions

Construction & Destruction
Accessors

Member Enumeration Documentation

anonymous enum : uint8_t

ConstantDescription
kNoVarArgs 

Doesn't have variable number of arguments (...).

Member Function Documentation

Error FuncDetail::init(const FuncSignature& signature, const Environment& environment)noexcept

Initializes this FuncDetail to the given signature.

const CallConv& FuncDetail::callConv() constnoexcept

Returns the function's calling convention, see CallConv.

uint32_t FuncDetail::flags() constnoexcept

Returns the associated calling convention flags, see CallConv::Flags.

bool FuncDetail::hasFlag(uint32_t ccFlag) constnoexcept

Checks whether a CallConv flag is set, see CallConv::Flags.

bool FuncDetail::hasRet() constnoexcept

Tests whether the function has a return value.

uint32_t FuncDetail::argCount() constnoexcept

Returns the number of function arguments.

FuncValuePack& FuncDetail::retPack()noexcept[1/2]

Returns function return values.

const FuncValuePack& FuncDetail::retPack() constnoexcept[2/2]

Returns function return values.

FuncValue& FuncDetail::ret(size_t valueIndex = 0)noexcept[1/2]

Returns a function return value associated with the given valueIndex.

const FuncValue& FuncDetail::ret(size_t valueIndex = 0) constnoexcept[2/2]

Returns a function return value associated with the given valueIndex (const).

FuncValuePack* FuncDetail::argPacks()noexcept[1/2]

Returns function argument packs array.

const FuncValuePack* FuncDetail::argPacks() constnoexcept[2/2]

Returns function argument packs array (const).

FuncValuePack& FuncDetail::argPack(size_t argIndex)noexcept[1/2]

Returns function argument pack at the given argIndex.

const FuncValuePack& FuncDetail::argPack(size_t argIndex) constnoexcept[2/2]

Returns function argument pack at the given argIndex (const).

FuncValue& FuncDetail::arg(size_t argIndex, size_t valueIndex = 0)noexcept[1/2]

Returns an argument at valueIndex from the argument pack at the given argIndex.

const FuncValue& FuncDetail::arg(size_t argIndex, size_t valueIndex = 0) constnoexcept[2/2]

Returns an argument at valueIndex from the argument pack at the given argIndex (const).

void FuncDetail::resetArg(size_t argIndex)noexcept

Resets an argument at the given argIndex.

If the argument is a parameter pack (has multiple values) all values are reset.

bool FuncDetail::hasVarArgs() constnoexcept

Tests whether the function has variable arguments.

uint32_t FuncDetail::vaIndex() constnoexcept

Returns an index of a first variable argument.

bool FuncDetail::hasStackArgs() constnoexcept

Tests whether the function passes one or more argument by stack.

uint32_t FuncDetail::argStackSize() constnoexcept

Returns stack size needed for function arguments passed on the stack.

uint32_t FuncDetail::redZoneSize() constnoexcept

Returns red zone size.

uint32_t FuncDetail::spillZoneSize() constnoexcept

Returns spill zone size.

uint32_t FuncDetail::naturalStackAlignment() constnoexcept

Returns natural stack alignment.

uint32_t FuncDetail::passedRegs(uint32_t group) constnoexcept

Returns a mask of all passed registers of the given register group.

uint32_t FuncDetail::preservedRegs(uint32_t group) constnoexcept

Returns a mask of all preserved registers of the given register group.

uint32_t FuncDetail::usedRegs(uint32_t group) constnoexcept

Returns a mask of all used registers of the given register group.

void FuncDetail::addUsedRegs(uint32_t group, uint32_t regs)noexcept

Adds regs to the mask of used registers of the given register group.

Member Data Documentation

CallConv FuncDetail::_callConv

Calling convention.

uint8_t FuncDetail::_argCount

Number of function arguments.

uint8_t FuncDetail::_vaIndex

Variable arguments index of kNoVarArgs.

uint16_t FuncDetail::_reserved

Reserved for future use.

uint32_t FuncDetail::_usedRegs[BaseReg::kGroupVirt]

Registers that contains arguments.

uint32_t FuncDetail::_argStackSize

Size of arguments passed by stack.

FuncValuePack FuncDetail::_rets

Function return value(s).

FuncValuePack FuncDetail::_args[Globals::kMaxFuncArgs]

Function arguments.