[][src]Struct dynasmrt::components::LitPool

pub struct LitPool { /* fields omitted */ }

Literal pool implementation. One can programmatically push items in this literal pool and retrieve offsets to them in the pool. Then later, the pool will be encoded into the instruction stream and items can be retrieved using the address of the literal pool. and the previously emitted offsets. Values are always at least aligned to their size.

Implementations

impl LitPool[src]

pub fn new() -> Self[src]

Create a new, empty literal pool

pub fn align(&mut self, size: usize, with: u8)[src]

Add extra alignment for the next value in the literal pool

pub fn push_u8(&mut self, value: u8) -> isize[src]

Encode value into the literal pool.

pub fn push_u16(&mut self, value: u16) -> isize[src]

Encode value into the literal pool.

pub fn push_u32(&mut self, value: u32) -> isize[src]

Encode value into the literal pool.

pub fn push_u64(&mut self, value: u64) -> isize[src]

Encode value into the literal pool.

pub fn push_dynamic(&mut self, id: DynamicLabel, size: RelocationSize) -> isize[src]

Encode the relative address of a label into the literal pool (relative to the location in the pool)

pub fn push_global(&mut self, name: &'static str, size: RelocationSize) -> isize[src]

Encode the relative address of a label into the literal pool (relative to the location in the pool)

pub fn push_forward(
    &mut self,
    name: &'static str,
    size: RelocationSize
) -> isize
[src]

Encode the relative address of a label into the literal pool (relative to the location in the pool)

pub fn push_backward(
    &mut self,
    name: &'static str,
    size: RelocationSize
) -> isize
[src]

Encode the relative address of a label into the literal pool (relative to the location in the pool)

pub fn emit<D: DynasmLabelApi>(self, assembler: &mut D)[src]

Emit this literal pool into the specified assembler

Trait Implementations

impl Clone for LitPool[src]

impl Debug for LitPool[src]

impl Default for LitPool[src]

Auto Trait Implementations

impl RefUnwindSafe for LitPool

impl Send for LitPool

impl Sync for LitPool

impl Unpin for LitPool

impl UnwindSafe for LitPool

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.