IndexLoggingasmjit::Formatter

asmjit::Formatter Namespace Reference [¶]

Provides formatting functionality to format operands, instructions, and nodes.

Functions

Error Formatter::format_type_id(
String& sb,
TypeId type_id
)noexcept[¶]

Appends a formatted type_id to the output string sb.

Error Formatter::format_feature(
String& sb,
Arch arch,
uint32_t feature_id
)noexcept[¶]

Appends a formatted feature_id to the output string sb.

See CpuFeatures.

Error Formatter::format_register(
String& sb,
FormatFlags format_flags,
const BaseEmitter* emitter,
Arch arch,
RegType reg_type,
uint32_t reg_id
)noexcept[¶]

Appends a formatted register to the output string sb.

Note

Emitter is optional, but it's required to format virtual registers, which won't be formatted properly if the emitter is not provided.

Error Formatter::format_label(
String& sb,
FormatFlags format_flags,
const BaseEmitter* emitter,
uint32_t label_id
)noexcept[¶]

Appends a formatted label to the output string sb.

Note

Emitter is optional, but it's required to format named labels properly, otherwise the formatted as it is an anonymous label.

Error Formatter::format_operand(
String& sb,
FormatFlags format_flags,
const BaseEmitter* emitter,
Arch arch,
const Operand_& op
)noexcept[¶]

Appends a formatted operand to the output string sb.

Note

Emitter is optional, but it's required to format named labels and virtual registers. See format_register() and format_label() for more details.

Error Formatter::format_data_type(
String& sb,
FormatFlags format_flags,
Arch arch,
TypeId type_id
)noexcept[¶]

Appends a formatted data-type to the output string sb.

Error Formatter::format_data(
String& sb,
FormatFlags format_flags,
Arch arch,
TypeId type_id,
const void* data,
size_t item_count,
size_t repeat_count = 1
)noexcept[¶]

Appends a formatted data to the output string sb.

Error Formatter::format_instruction(
String& sb,
FormatFlags format_flags,
const BaseEmitter* emitter,
Arch arch,
const BaseInst& inst,
Span<const Operand_> operands
)noexcept[¶]

Appends a formatted instruction to the output string sb.

Note

Emitter is optional, but it's required to format named labels and virtual registers. See format_register() and format_label() for more details.

Error Formatter::format_node(
String& sb,
const FormatOptions& format_options,
const BaseBuilder* builder,
const BaseNode* node
)noexcept[¶]

Appends a formatted node to the output string sb.

The node must belong to the provided builder.

Error Formatter::format_node_list(
String& sb,
const FormatOptions& format_options,
const BaseBuilder* builder
)noexcept[1/2][¶]

Appends formatted nodes to the output string sb.

All nodes that are part of the given builder will be appended.

Error Formatter::format_node_list(
String& sb,
const FormatOptions& format_options,
const BaseBuilder* builder,
const BaseNode* begin,
const BaseNode* end
)noexcept[2/2][¶]

Appends formatted nodes to the output string sb.

This function works the same as format_node(), but appends more nodes to the output string, separating each node with a newline '
' character.