Struct AsmCodeSink

Source
pub struct AsmCodeSink<'a> {
    pub sink: &'a mut MachBuffer<Inst>,
    pub incoming_arg_offset: i32,
    pub slot_offset: i32,
}
Available on crate feature x86 only.
Expand description

Implementor of the [asm::CodeSink] trait.

Fields§

§sink: &'a mut MachBuffer<Inst>

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§

Source§

impl CodeSink for AsmCodeSink<'_>

Source§

fn put1(&mut self, value: u8)

Add 1 byte to the code section.
Source§

fn put2(&mut self, value: u16)

Add 2 bytes to the code section.
Source§

fn put4(&mut self, value: u32)

Add 4 bytes to the code section.
Source§

fn put8(&mut self, value: u64)

Add 8 bytes to the code section.
Source§

fn add_trap(&mut self, code: TrapCode)

Inform the code buffer of a possible trap at the current location; required for assembling memory accesses.
Source§

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
Source§

fn known_offset(&self, offset: KnownOffset) -> 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.