asmjit::Label Class Reference
Inheritance diagram for asmjit::Label:
asmjit::Operand asmjit::Operand_

Label (jump target or data location).

Label represents a location in code typically used as a jump target, but may be also a reference to some data or a static variable. Label has to be explicitly created by BaseEmitter.

Example of using labels:

// Create some emitter (for example x86::Assembler).
// Create Label instance.
Label L1 = a.newLabel();
// ... your code ...
// Using label.
a.jump(L1);
// ... your code ...
// Bind label to the current position, see `BaseEmitter::bind()`.
a.bind(L1);

Member Functions

Construction & Destruction
Overloaded Operators
Accessors
- Public Member Functions inherited from asmjit::Operand
- Public Member Functions inherited from asmjit::Operand_

Additional Inherited Members

- Public Attributes inherited from asmjit::Operand_
- Public Types inherited from asmjit::Operand_
- Static Public Member Functions inherited from asmjit::Operand_

Constructor & Destructor Documentation

Label::Label()constexprconstexprnoexcept[1/3]◆ 

Creates a label operand without ID (you must set the ID to make it valid).

Label::Label(const Label& other)constexprconstexprnoexcept[2/3]◆ 

Creates a cloned label operand of other.

Label::Label(uint32_t id)constexprexplicitconstexprnoexcept[3/3]◆ 

Creates a label operand of the given id.

Member Function Documentation

void Label::reset()noexcept◆ 

Resets the label, will reset all properties and set its ID to Globals::kInvalidId.

bool Label::isValid() constconstexprconstexprnoexcept◆ 

Tests whether the label was created by CodeHolder and/or an attached emitter.

void Label::setId(uint32_t id)noexcept◆ 

Sets the label id.