pub struct AsmStmt {
pub template: String,
pub operands: Vec<AsmOperand>,
pub clobbers: Vec<&'static str>,
pub range: SourceRange,
}Expand description
An inline assembly statement, already in asm!’s terms.
Sema has done all the mapping (see sema/asm.rs): the template is Rust’s
— %0 is {o0}, %% is %, braces are doubled — and each operand says
which register and which direction. What is left for code generation is
evaluating the operands and storing the outputs back.
Fields§
§template: StringThe template in asm!’s syntax, still AT&T assembly: code generation
always adds options(att_syntax).
operands: Vec<AsmOperand>The operands, in GCC’s order (outputs, then inputs), with each tied input folded into the output it is tied to.
clobbers: Vec<&'static str>The registers the statement clobbers, in asm!’s spelling (rax,
xmm0), each of which becomes out("rax") _. "memory" and "cc"
are not here: they are what asm! assumes without being told.
range: SourceRangeWhere the statement was written.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AsmStmt
impl RefUnwindSafe for AsmStmt
impl Send for AsmStmt
impl Sync for AsmStmt
impl Unpin for AsmStmt
impl UnsafeUnpin for AsmStmt
impl UnwindSafe for AsmStmt
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