IndexX86 Backendasmjit::x86::Vec

asmjit::x86::Vec Class Reference [¶]

Inheritance diagram for asmjit::x86::Vec:
asmjit::Reg asmjit::Operand asmjit::Operand_

Vector register (XMM|YMM|ZMM) (X86|X86_64).

To get a specific register you can use:

  • specific registers directly, like x86::xmm0 or x86::ymm1, x86::zmm2, etc...
  • construct a register operand dynamically, like x86::xmm(id), x86::ymm(id), and x86::zmm(id)
  • use Vec::make_v[128|256|512](id) or Vec::make_[xmm|ymm|zmm](id) API for convenience

To cast a register to a specific type, use Vec::v128(), Vec::v256(), Vec::v512(), Vec::xmm(), Vec::ymm(), and Vec::zmm() member functions. Each cast first clones the register and then changes its signature to match the register it has been casted to.

Member Functions

Vec Register Accessors
- Public Member Functions inherited from asmjit::Reg
- Public Member Functions inherited from asmjit::Operand
- Public Member Functions inherited from asmjit::Operand_

Static Functions

Static Constructors
- Static Public Member Functions inherited from asmjit::Reg
- Static Public Member Functions inherited from asmjit::Operand_

Additional Inherited Members

- Public Attributes inherited from asmjit::Operand_
- Static Public Attributes inherited from asmjit::Reg
- Static Public Attributes inherited from asmjit::Operand_
- Public Types inherited from asmjit::Operand_

x86::Vec::Vec()constexprnoexcept[1/5][¶]

Default constructor that only setups basics.

x86::Vec::Vec(
const Vec& other
)constexprnoexcept[2/5][¶]

Makes a copy of the other register operand.

x86::Vec::Vec(
const Reg& other,
uint32_t id
)constexprnoexcept[3/5][¶]

Makes a copy of the other register having id set to id

x86::Vec::Vec(
const OperandSignature& sgn,
uint32_t id
)constexprnoexcept[4/5][¶]

Creates a register based on signature and id.

x86::Vec::Vec()explicitnoexcept[5/5][¶]

Creates a completely uninitialized Vec register operand (garbage).

Vec x86::Vec::fromTypeAndId(
RegType type,
uint32_t id
)staticnoexcept[¶]

Creates a new register from register type and id.

Vec x86::Vec::clone() constconstexprnoexcept[¶]

Clones the register operand.

Vec x86::Vec::make_v128(
uint32_t regId
)constexprstaticnoexcept[¶]

Creates a new 128-bit vector register (XMM) having the given register id regId.

Vec x86::Vec::make_v256(
uint32_t regId
)constexprstaticnoexcept[¶]

Creates a new 256-bit vector register (YMM) having the given register id regId.

Vec x86::Vec::make_v512(
uint32_t regId
)constexprstaticnoexcept[¶]

Creates a new 512-bit vector register (ZMM) having the given register id regId.

Vec x86::Vec::make_xmm(
uint32_t regId
)constexprstaticnoexcept[¶]

Creates a new 128-bit vector register (XMM) having the given register id regId.

Note
This is an architecture-specific naming that does the same as make_v128().

Vec x86::Vec::make_ymm(
uint32_t regId
)constexprstaticnoexcept[¶]

Creates a new 256-bit vector register (YMM) having the given register id regId.

Note
This is an architecture-specific naming that does the same as make_v256().

Vec x86::Vec::make_zmm(
uint32_t regId
)constexprstaticnoexcept[¶]

Creates a new 512-bit vector register (ZMM) having the given register id regId.

Note
This is an architecture-specific naming that does the same as make_v512().

bool x86::Vec::isXmm() constconstexprnoexcept[¶]

Tests whether the register is a 128-bit vector (XMM).

Note
This is an architecture-specific naming that does the same as Reg::isVec128().

bool x86::Vec::isYmm() constconstexprnoexcept[¶]

Tests whether the register is a 256-bit vector (YMM).

Note
This is an architecture-specific naming that does the same as Reg::isVec256().

bool x86::Vec::isZmm() constconstexprnoexcept[¶]

Tests whether the register is a 512-bit vector (ZMM).

Note
This is an architecture-specific naming that does the same as Reg::isVec512().

Vec x86::Vec::v128() constconstexprnoexcept[¶]

Clones and casts this register to XMM (Vec128).

Vec x86::Vec::v256() constconstexprnoexcept[¶]

Clones and casts this register to YMM (Vec256).

Vec x86::Vec::v512() constconstexprnoexcept[¶]

Clones and casts this register to ZMM (Vec512).

Vec x86::Vec::xmm() constconstexprnoexcept[¶]

Clones and casts this register to XMM (Vec128).

Note
This is an architecture-specific naming that does the same as v128().

Vec x86::Vec::ymm() constconstexprnoexcept[¶]

Clones and casts this register to YMM (Vec256).

Note
This is an architecture-specific naming that does the same as v256().

Vec x86::Vec::zmm() constconstexprnoexcept[¶]

Clones and casts this register to ZMM (Vec512).

Note
This is an architecture-specific naming that does the same as v512().

Vec x86::Vec::half() constconstexprnoexcept[¶]

Clones and casts this register to a register that has half the size (or XMM if it's already XMM).

Note
AsmJit defines vector registers of various sizes to target multiple architectures, however, this function never returns a vector register that would have less than 128 bits as X86|X86_64 architecture doesn't provide such registers. So, effectively this function returns either YMM register if the input was ZMM, or XMM for whatever else input.