IndexBuilderasmjit::EmbedDataNode

asmjit::EmbedDataNode Class Reference [¶]

Inheritance diagram for asmjit::EmbedDataNode:
asmjit::BaseNode

Embed data node.

Wraps .data directive. The node contains data that will be placed at the node's position in the assembler stream. The data is considered to be RAW; no analysis nor byte-order conversion is performed on RAW data.

Public Members

Members
- Public Attributes inherited from asmjit::BaseNode

Member Functions

Construction & Destruction
Accessors
- Public Member Functions inherited from asmjit::BaseNode

EmbedDataNode::EmbedDataNode(
TypeId typeId,
uint8_t typeSize,
size_t itemCount,
size_t repeatCount
)noexcept[¶]

Creates a new EmbedDataNode instance.

TypeId EmbedDataNode::typeId() constnoexcept[¶]

Returns data type as TypeId.

uint32_t EmbedDataNode::typeSize() constnoexcept[¶]

Returns the size of a single data element.

template<typename T = uint8_t>
uint8_t* EmbedDataNode::data()noexcept[1/2][¶]

Returns a pointer to the data casted to T* - uint8_t* by default.

template<typename T = uint8_t>
const uint8_t* EmbedDataNode::data() constnoexcept[2/2][¶]

Returns a pointer to the data casted to T* - const uint8_t* by default (const).

size_t EmbedDataNode::itemCount() constnoexcept[¶]

Returns the number of (typed) items in the array.

size_t EmbedDataNode::repeatCount() constnoexcept[¶]

Returns how many times the data is repeated (default 1).

Repeated data is useful when defining constants for SIMD, for example.

size_t EmbedDataNode::dataSize() constnoexcept[¶]

Returns the size of the data, not considering the number of times it repeats.

Note
The returned value is the same as typeSize() * itemCount().