pub enum AsmOperandKind {
In(Expr),
Out {
place: Place,
late: bool,
},
InOut {
input: Option<Expr>,
output: Place,
},
Scratch(Expr),
Const(i128),
}Expand description
The direction of an AsmOperand.
Variants§
In(Expr)
An input: the value is computed before the statement.
Out
An output, stored into place afterwards. late is lateout — GCC’s
plain =, written only after every input has been read — and its
absence is out, GCC’s early clobber =&.
Fields
InOut
An operand that is read and written: GCC’s +, or an output with an
input tied to it by a digit constraint ("=r"(x) : "0"(y)).
Fields
Scratch(Expr)
An input whose register the statement overwrites, so the value it
leaves there is thrown away: inout(reg) value => _. This is an
input with the constraint "b", carried through a scratch register
that the xchg around the template swaps with rbx (see sema/asm.rs).
Const(i128)
An immediate, folded: "i"(3) is const 3.
Trait Implementations§
Source§impl Clone for AsmOperandKind
impl Clone for AsmOperandKind
Auto Trait Implementations§
impl Freeze for AsmOperandKind
impl RefUnwindSafe for AsmOperandKind
impl Send for AsmOperandKind
impl Sync for AsmOperandKind
impl Unpin for AsmOperandKind
impl UnsafeUnpin for AsmOperandKind
impl UnwindSafe for AsmOperandKind
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