IndexCoreasmjit::TypeUtils

asmjit::TypeUtils Namespace Reference [¶]

Type identifier utilities.

Classes

Functions

Variables

TypeId TypeUtils::scalar_of(
TypeId type_id
)staticnodiscardnoexcept[¶]

Returns the scalar type of type_id.

uint32_t TypeUtils::size_of(
TypeId type_id
)staticnodiscardnoexcept[¶]

Returns the size [in bytes] of type_id.

bool TypeUtils::is_between(
TypeId type_id,
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type type_id is between a and b.

bool TypeUtils::is_void(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type type_id is TypeId::kVoid.

bool TypeUtils::is_valid(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type type_id is a valid non-void type.

bool TypeUtils::is_scalar(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type type_id is scalar (has no vector part).

bool TypeUtils::is_abstract(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type type_id is abstract, which means that its size depends on register size.

bool TypeUtils::is_int(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is a scalar integer (signed or unsigned) of any size.

bool TypeUtils::is_int8(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is a scalar 8-bit integer (signed).

bool TypeUtils::is_uint8(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is a scalar 8-bit integer (unsigned).

bool TypeUtils::is_int16(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is a scalar 16-bit integer (signed).

bool TypeUtils::is_uint16(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is a scalar 16-bit integer (unsigned).

bool TypeUtils::is_int32(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is a scalar 32-bit integer (signed).

bool TypeUtils::is_uint32(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is a scalar 32-bit integer (unsigned).

bool TypeUtils::is_int64(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is a scalar 64-bit integer (signed).

bool TypeUtils::is_uint64(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is a scalar 64-bit integer (unsigned).

bool TypeUtils::is_gp8(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is an 8-bit general purpose register representing either signed or unsigned 8-bit integer.

bool TypeUtils::is_gp16(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is a 16-bit general purpose register representing either signed or unsigned 16-bit integer.

bool TypeUtils::is_gp32(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is a 32-bit general purpose register representing either signed or unsigned 32-bit integer.

bool TypeUtils::is_gp64(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is a 64-bit general purpose register representing either signed or unsigned 64-bit integer.

bool TypeUtils::is_float(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is a scalar floating point of any size.

bool TypeUtils::is_float32(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is a scalar 32-bit float.

bool TypeUtils::is_float64(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is a scalar 64-bit float.

bool TypeUtils::is_float80(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is a scalar 80-bit float.

bool TypeUtils::is_mask(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is a mask register of any size.

bool TypeUtils::is_mask8(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is an 8-bit mask register.

bool TypeUtils::is_mask16(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is an 16-bit mask register.

bool TypeUtils::is_mask32(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is an 32-bit mask register.

bool TypeUtils::is_mask64(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is an 64-bit mask register.

bool TypeUtils::is_mmx(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is an MMX register.

Note

MMX functionality is in general deprecated on X86 architecture. AsmJit provides it just for completeness.

bool TypeUtils::is_mmx32(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is an MMX register, which only uses the low 32 bits of data (only specific cases).

Note

MMX functionality is in general deprecated on X86 architecture. AsmJit provides it just for completeness.

bool TypeUtils::is_mmx64(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is an MMX register, which uses 64 bits of data (default).

Note

MMX functionality is in general deprecated on X86 architecture. AsmJit provides it just for completeness.

bool TypeUtils::is_vec(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is a vector register of any size.

bool TypeUtils::is_vec32(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is a 32-bit or 32-bit view of a vector register.

bool TypeUtils::is_vec64(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is a 64-bit or 64-bit view of a vector register.

bool TypeUtils::is_vec128(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is a 128-bit or 128-bit view of a vector register.

bool TypeUtils::is_vec256(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is a 256-bit or 256-bit view of a vector register.

bool TypeUtils::is_vec512(
TypeId type_id
)constexprstaticnodiscardnoexcept[¶]

Tests whether a given type is a 512-bit or 512-bit view of a vector register.

template<typename T>
TypeId TypeUtils::type_id_of_t()constexprstaticnoexcept[¶]

Returns a corresponding TypeId of T type.

uint32_t TypeUtils::deabstract_delta_of_size(
uint32_t register_size
)constexprstaticnodiscardnoexcept[¶]

Returns offset needed to convert a kIntPtr and kUIntPtr TypeId into a type that matches register_size (general-purpose register size). If you find such TypeId it's then only about adding the offset to it.

For example:

uint32_t register_size = /* 4 or 8 *&zwj;/;
uint32_t deabstract_delta = TypeUtils::deabstract_delta_of_size(register_size);
TypeId type_id = 'some type-id';
// Normalize some type_id into a non-abstract type_id.
if (TypeUtils::is_abstract(type_id)) type_id += deabstract_delta;
// The same, but by using TypeUtils::deabstract() function.
type_id = TypeUtils::deabstract(type_id, deabstract_delta);

TypeId TypeUtils::deabstract(
TypeId type_id,
uint32_t deabstract_delta
)constexprstaticnodiscardnoexcept[¶]

Deabstracts a given type_id into a native type by using deabstract_delta, which was previously calculated by calling deabstract_delta_of_size() with a target native register size.