Struct AsmCodeSink
pub struct AsmCodeSink<'a> {
pub sink: &'a mut MachBuffer<MInst>,
pub incoming_arg_offset: i32,
pub slot_offset: i32,
}
Expand description
Implementor of the [asm::CodeSink
] trait.
Fields§
§sink: &'a mut MachBuffer<MInst>
The buffer this is emitting into.
incoming_arg_offset: i32
The value of KEY_INCOMING_ARG
.
slot_offset: i32
The value of KEY_SLOT_OFFSET
.
Trait Implementations§
§impl CodeSink for AsmCodeSink<'_>
impl CodeSink for AsmCodeSink<'_>
§fn add_trap(&mut self, code: TrapCode)
fn add_trap(&mut self, code: TrapCode)
Inform the code buffer of a possible trap at the current location;
required for assembling memory accesses.
§fn use_target(&mut self, target: DeferredTarget)
fn use_target(&mut self, target: DeferredTarget)
Inform the code buffer that a use of
target
is about to happen at the
current offset. Read more§fn known_offset(&self, offset: u8) -> i32
fn known_offset(&self, offset: u8) -> i32
Resolves a
KnownOffset
value to the actual signed offset.Auto Trait Implementations§
impl<'a> Freeze for AsmCodeSink<'a>
impl<'a> RefUnwindSafe for AsmCodeSink<'a>
impl<'a> Send for AsmCodeSink<'a>
impl<'a> Sync for AsmCodeSink<'a>
impl<'a> Unpin for AsmCodeSink<'a>
impl<'a> !UnwindSafe for AsmCodeSink<'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