pub struct InstBuilder<'a> { /* private fields */ }Expand description
One instruction being built.
The order the operands are given in is the order they are stored in, and the builder is what insists that order is the one the printer and the parser agree on.
Implementations§
Source§impl InstBuilder<'_>
impl InstBuilder<'_>
Sourcepub fn operand(self, operand: Operand) -> Self
pub fn operand(self, operand: Operand) -> Self
Adds an operand.
§Panics
Panics if an operand the instruction writes is given after one it reads, or if either is given after the memory operand, because both make the instruction print as text that reads back as a different one.
Sourcepub fn def(self, reg: Reg, class: RegClass) -> Self
pub fn def(self, reg: Reg, class: RegClass) -> Self
Adds the operand the instruction writes, in the common case where nothing constrains it.
Sourcepub fn uses(self, reg: Reg, class: RegClass) -> Self
pub fn uses(self, reg: Reg, class: RegClass) -> Self
Adds an operand the instruction reads, in the common case where nothing constrains it.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !UnwindSafe for InstBuilder<'a>
impl<'a> Freeze for InstBuilder<'a>
impl<'a> RefUnwindSafe for InstBuilder<'a>
impl<'a> Send for InstBuilder<'a>
impl<'a> Sync for InstBuilder<'a>
impl<'a> Unpin for InstBuilder<'a>
impl<'a> UnsafeUnpin for InstBuilder<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more