asmjit::Type Namespace Reference

Provides a minimalist type-system that is used by Asmjit library.

Classes

Enumerations

Functions

Variables

Enumeration Type Documentation

Type::Id : uint32_tenum

TypeId.

This is an additional information that can be used to describe a value-type of physical or virtual register. it's used mostly by BaseCompiler to describe register representation (the group of data stored in the register and the width used) and it's also used by APIs that allow to describe and work with function signatures.

ConstantDescription
kIdVoid 

Void type.

kIdIntPtr 

Abstract signed integer type that has a native size.

kIdUIntPtr 

Abstract unsigned integer type that has a native size.

kIdI8 

8-bit signed integer type.

kIdU8 

8-bit unsigned integer type.

kIdI16 

16-bit signed integer type.

kIdU16 

16-bit unsigned integer type.

kIdI32 

32-bit signed integer type.

kIdU32 

32-bit unsigned integer type.

kIdI64 

64-bit signed integer type.

kIdU64 

64-bit unsigned integer type.

kIdF32 

32-bit floating point type.

kIdF64 

64-bit floating point type.

kIdF80 

80-bit floating point type.

kIdMask8 

8-bit opmask register (K).

kIdMask16 

16-bit opmask register (K).

kIdMask32 

32-bit opmask register (K).

kIdMask64 

64-bit opmask register (K).

kIdMmx32 

64-bit MMX register only used for 32 bits.

kIdMmx64 

64-bit MMX register.

Function Documentation

uint32_t Type::deabstractDeltaOfSize(uint32_t registerSize)constexprstaticconstexprnoexcept

Returns offset needed to convert a kIntPtr and kUIntPtr TypeId into a type that matches registerSize (general-purpose register size).

If you find such TypeId it's then only about adding the offset to it.

For example:

uint32_t registerSize = '4' or '8';
uint32_t deabstractDelta = Type::deabstractDeltaOfSize(registerSize);
uint32_t typeId = 'some type-id';
// Normalize some typeId into a non-abstract typeId.
if (Type::isAbstract(typeId)) typeId += deabstractDelta;
// The same, but by using Type::deabstract() function.
typeId = Type::deabstract(typeId, deabstractDelta);

Variable Documentation

template<typename T>
struct IdOfT constexpr uint32_t Type::kTypeId = _TypeIdDeducedAtCompileTime_

IdOfT<> template allows to get a TypeId from a C++ type T.

TypeId of C++ type T.