asmjit::Formatter Namespace Reference

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

Functions

Function Documentation

Error Formatter::formatTypeId(String& sb, uint32_t typeId)noexcept

Appends a formatted typeId to the output string sb.

Error Formatter::formatFeature(String& sb, uint32_t arch, uint32_t featureId)noexcept

Appends a formatted featureId to the output string sb.

See BaseFeatures.

Error Formatter::formatRegister(String& sb, uint32_t formatFlags, const BaseEmitter* emitter, uint32_t arch, uint32_t regType, uint32_t regId)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::formatLabel(String& sb, uint32_t formatFlags, const BaseEmitter* emitter, uint32_t labelId)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::formatOperand(String& sb, uint32_t formatFlags, const BaseEmitter* emitter, uint32_t 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 formatRegister() and formatLabel() for more details.

Error Formatter::formatInstruction(String& sb, uint32_t formatFlags, const BaseEmitter* emitter, uint32_t arch, const BaseInst& inst, const Operand_* operands, size_t opCount)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 formatRegister() and formatLabel() for more details.

Error Formatter::formatNode(String& sb, uint32_t formatFlags, 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::formatNodeList(String& sb, uint32_t formatFlags, 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::formatNodeList(String& sb, uint32_t formatFlags, 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 formatNode(), but appends more nodes to the output string, separating each node with a newline '
' character.