IndexCoreasmjit::ArchTraits

asmjit::ArchTraits Struct Reference [¶]

Architecture traits used by Function API and Compiler's register allocator.

Member Functions

Accessors

Static Functions

Statics

uint32_t ArchTraits::spRegId() constnoexcept[¶]

Returns stack pointer register id (always GP register).

uint32_t ArchTraits::fpRegId() constnoexcept[¶]

Returns stack frame register id (always GP register).

uint32_t ArchTraits::linkRegId() constnoexcept[¶]

Returns link register id, if the architecture provides it (always GP register).

uint32_t ArchTraits::pcRegId() constnoexcept[¶]

Returns program counter register id, if the architecture exposes it (always GP register).

uint32_t ArchTraits::hwStackAlignment() constnoexcept[¶]

Returns a hardware stack alignment requirement.

Note
This is a hardware constraint. Architectures that don't constrain it would return the lowest alignment (1), however, some architectures may constrain the alignment, for example AArch64 requires 16-byte alignment.

bool ArchTraits::hasLinkReg() constnoexcept[¶]

Tests whether the architecture provides link register, which is used across function calls.

If the link register is not provided then a function call pushes the return address on stack (X86/X64).

uint32_t ArchTraits::minStackOffset() constnoexcept[¶]

Returns minimum addressable offset on stack guaranteed for all instructions.

uint32_t ArchTraits::maxStackOffset() constnoexcept[¶]

Returns maximum addressable offset on stack depending on specific instruction.

InstHints ArchTraits::instFeatureHints(
RegGroup group
) constnoexcept[¶]

Returns ISA flags of the given register group.

bool ArchTraits::hasInstHint(
RegGroup group,
InstHints feature
) constnoexcept[¶]

Tests whether the given register group has the given flag set.

bool ArchTraits::hasInstRegSwap(
RegGroup group
) constnoexcept[¶]

Tests whether the ISA provides register swap instruction for the given register group.

bool ArchTraits::hasInstPushPop(
RegGroup group
) constnoexcept[¶]

Tests whether the ISA provides push/pop instructions for the given register group.

const ArchTypeNameId* ArchTraits::typeNameIdTable() constnoexcept[¶]

Returns a table of ISA word names that appear in formatted text.

Word names are ISA dependent.

The index of this table is log2 of the size:

  • [0] 8-bits
  • [1] 16-bits
  • [2] 32-bits
  • [3] 64-bits

ArchTypeNameId ArchTraits::typeNameIdByIndex(
uint32_t index
) constnoexcept[¶]

Returns an ISA word name identifier of the given index, see typeNameIdTable() for more details.

const ArchTraits& ArchTraits::byArch(
Arch arch
)staticnoexcept[¶]

Returns a const reference to ArchTraits for the given architecture arch.

uint8_t ArchTraits::_spRegId[¶]

Stack pointer register id.

uint8_t ArchTraits::_fpRegId[¶]

Frame pointer register id.

uint8_t ArchTraits::_linkRegId[¶]

Link register id.

uint8_t ArchTraits::_pcRegId[¶]

Instruction pointer (or program counter) register id, if accessible.

uint8_t ArchTraits::_hwStackAlignment[¶]

Hardware stack alignment requirement.

uint32_t ArchTraits::_minStackOffset[¶]

Minimum addressable offset on stack guaranteed for all instructions.

uint32_t ArchTraits::_maxStackOffset[¶]

Maximum addressable offset on stack depending on specific instruction.

uint32_t ArchTraits::_supportedRegTypes[¶]

Bit-mask indexed by RegType that describes, which register types are supported by the ISA.

Support::Array<InstHints, Globals::kNumVirtGroups>ArchTraits::_instHints[¶]

Flags for each virtual register group.

Support::Array<RegType, 32>ArchTraits::_typeIdToRegType[¶]

Maps scalar TypeId values (from TypeId::_kIdBaseStart) to register types, see TypeId.

ArchTypeNameId ArchTraits::_typeNameIdTable[4][¶]

Word name identifiers of 8-bit, 16-bit, 32-bit, and 64-bit quantities that appear in formatted text.