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 type_id,
uint8_t type_size,
size_t item_count,
size_t repeat_count
)noexcept[¶]

Creates a new EmbedDataNode instance.

TypeId EmbedDataNode::type_id() constnodiscardnoexcept[¶]

Returns data type as TypeId.

uint32_t EmbedDataNode::type_size() constnodiscardnoexcept[¶]

Returns the size of a single data element.

template<typename T = uint8_t>
uint8_t* EmbedDataNode::data()nodiscardnoexcept[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() constnodiscardnoexcept[2/2][¶]

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

size_t EmbedDataNode::item_count() constnodiscardnoexcept[¶]

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

size_t EmbedDataNode::repeat_count() constnodiscardnoexcept[¶]

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

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

size_t EmbedDataNode::data_size() constnodiscardnoexcept[¶]

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

Note

The returned value is the same as type_size() * item_count().