Struct juicebox_asm::Label

source ·
pub struct Label { /* private fields */ }
Expand description

A label which is used as target for jump instructions.

use juicebox_asm::prelude::*;

let mut lbl = Label::new();
let mut asm = Asm::new();

// Skip the mov instruction.
asm.jmp(&mut lbl);
asm.mov(Reg64::rax, Reg64::rax);
asm.bind(&mut lbl);

Panics

Panics if the label is dropped while not yet bound, or having unresolved relocations. This is mainly a safety-guard to detect wrong usage.

Implementations§

Create a new unbound Label.

Trait Implementations§

Executes the destructor for this type. Read more
Emit an unconditional jump instruction.
Emit a conditional jump if not zero instruction (ZF = 0).
Emit a conditional jump if zero instruction (ZF = 1).

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.