[][src]Trait dynasmrt::DynasmLabelApi

pub trait DynasmLabelApi: DynasmApi {
    type Relocation: Relocation;
    pub fn local_label(&mut self, name: &'static str);
pub fn global_label(&mut self, name: &'static str);
pub fn dynamic_label(&mut self, id: DynamicLabel);
pub fn forward_relocation(
        &mut self,
        name: &'static str,
        target_offset: isize,
        field_offset: u8,
        ref_offset: u8,
        kind: Self::Relocation
    );
pub fn backward_relocation(
        &mut self,
        name: &'static str,
        target_offset: isize,
        field_offset: u8,
        ref_offset: u8,
        kind: Self::Relocation
    );
pub fn global_relocation(
        &mut self,
        name: &'static str,
        target_offset: isize,
        field_offset: u8,
        ref_offset: u8,
        kind: Self::Relocation
    );
pub fn dynamic_relocation(
        &mut self,
        id: DynamicLabel,
        target_offset: isize,
        field_offset: u8,
        ref_offset: u8,
        kind: Self::Relocation
    );
pub fn bare_relocation(
        &mut self,
        target: usize,
        field_offset: u8,
        ref_offset: u8,
        kind: Self::Relocation
    ); pub fn forward_reloc(
        &mut self,
        name: &'static str,
        target_offset: isize,
        field_offset: u8,
        ref_offset: u8,
        kind: <Self::Relocation as Relocation>::Encoding
    ) { ... }
pub fn backward_reloc(
        &mut self,
        name: &'static str,
        target_offset: isize,
        field_offset: u8,
        ref_offset: u8,
        kind: <Self::Relocation as Relocation>::Encoding
    ) { ... }
pub fn global_reloc(
        &mut self,
        name: &'static str,
        target_offset: isize,
        field_offset: u8,
        ref_offset: u8,
        kind: <Self::Relocation as Relocation>::Encoding
    ) { ... }
pub fn dynamic_reloc(
        &mut self,
        id: DynamicLabel,
        target_offset: isize,
        field_offset: u8,
        ref_offset: u8,
        kind: <Self::Relocation as Relocation>::Encoding
    ) { ... }
pub fn bare_reloc(
        &mut self,
        target: usize,
        field_offset: u8,
        ref_offset: u8,
        kind: <Self::Relocation as Relocation>::Encoding
    ) { ... } }

This trait extends DynasmApi to not only allow assembling, but also labels and various directives

Associated Types

type Relocation: Relocation[src]

The relocation info type this assembler uses.

Loading content...

Required methods

pub fn local_label(&mut self, name: &'static str)[src]

Record the definition of a local label

pub fn global_label(&mut self, name: &'static str)[src]

Record the definition of a global label

pub fn dynamic_label(&mut self, id: DynamicLabel)[src]

Record the definition of a dynamic label

pub fn forward_relocation(
    &mut self,
    name: &'static str,
    target_offset: isize,
    field_offset: u8,
    ref_offset: u8,
    kind: Self::Relocation
)
[src]

Equivalent of forward_reloc, but takes a non-encoded relocation

pub fn backward_relocation(
    &mut self,
    name: &'static str,
    target_offset: isize,
    field_offset: u8,
    ref_offset: u8,
    kind: Self::Relocation
)
[src]

Equivalent of backward_reloc, but takes a non-encoded relocation

pub fn global_relocation(
    &mut self,
    name: &'static str,
    target_offset: isize,
    field_offset: u8,
    ref_offset: u8,
    kind: Self::Relocation
)
[src]

Equivalent of global_reloc, but takes a non-encoded relocation

pub fn dynamic_relocation(
    &mut self,
    id: DynamicLabel,
    target_offset: isize,
    field_offset: u8,
    ref_offset: u8,
    kind: Self::Relocation
)
[src]

Equivalent of dynamic_reloc, but takes a non-encoded relocation

pub fn bare_relocation(
    &mut self,
    target: usize,
    field_offset: u8,
    ref_offset: u8,
    kind: Self::Relocation
)
[src]

Equivalent of bare_reloc, but takes a non-encoded relocation

Loading content...

Provided methods

pub fn forward_reloc(
    &mut self,
    name: &'static str,
    target_offset: isize,
    field_offset: u8,
    ref_offset: u8,
    kind: <Self::Relocation as Relocation>::Encoding
)
[src]

Record a relocation spot for a forward reference to a local label

pub fn backward_reloc(
    &mut self,
    name: &'static str,
    target_offset: isize,
    field_offset: u8,
    ref_offset: u8,
    kind: <Self::Relocation as Relocation>::Encoding
)
[src]

Record a relocation spot for a backward reference to a local label

pub fn global_reloc(
    &mut self,
    name: &'static str,
    target_offset: isize,
    field_offset: u8,
    ref_offset: u8,
    kind: <Self::Relocation as Relocation>::Encoding
)
[src]

Record a relocation spot for a reference to a global label

pub fn dynamic_reloc(
    &mut self,
    id: DynamicLabel,
    target_offset: isize,
    field_offset: u8,
    ref_offset: u8,
    kind: <Self::Relocation as Relocation>::Encoding
)
[src]

Record a relocation spot for a reference to a dynamic label

pub fn bare_reloc(
    &mut self,
    target: usize,
    field_offset: u8,
    ref_offset: u8,
    kind: <Self::Relocation as Relocation>::Encoding
)
[src]

Record a relocation spot to an arbitrary target.

Loading content...

Implementors

impl<'a, R: Relocation> DynasmLabelApi for Modifier<'a, R>[src]

type Relocation = R

impl<R: Relocation> DynasmLabelApi for Assembler<R>[src]

type Relocation = R

impl<R: Relocation> DynasmLabelApi for VecAssembler<R>[src]

type Relocation = R

Loading content...