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

Constructor & Destructor Documentation

EmbedDataNode::EmbedDataNode(BaseBuilder* cb)noexcept

Creates a new EmbedDataNode instance.

Member Function Documentation

TypeId EmbedDataNode::typeId() constnoexcept

Returns data type as TypeId.

uint32_t EmbedDataNode::typeSize() constnoexcept

Returns the size of a single data element.

uint8_t* EmbedDataNode::data() constnoexcept

Returns a pointer to the data casted to uint8_t.

template<typename T>
T* EmbedDataNode::dataAs() constnoexcept

Returns a pointer to the data casted to T.

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().