Skip to main content

AsmEmitter

Struct AsmEmitter 

Source
pub struct AsmEmitter {
    pub lines: Vec<String>,
    pub rust_lines: Vec<String>,
    pub num_local_labels: usize,
    pub num_global_labels: usize,
    pub enable_label_count_comments: bool,
    pub enable_code_origin_comments: bool,
    pub enable_instr_annotations: bool,
    pub emit_elf_debug_directives: bool,
    /* private fields */
}

Fields§

§lines: Vec<String>§rust_lines: Vec<String>§num_local_labels: usize§num_global_labels: usize§enable_label_count_comments: bool§enable_code_origin_comments: bool§enable_instr_annotations: bool§emit_elf_debug_directives: bool

Implementations§

Source§

impl AsmEmitter

Source

pub fn new() -> Self

Source

pub fn puts(&mut self, line: &str)

Source

pub fn put_str(&mut self, line: &str)

Source

pub fn put_rust(&mut self, line: &str)

Source

pub fn rust_source(&self) -> String

Source

pub fn puts_label( &mut self, label: &str, is_global: bool, is_export: bool, is_aligned: bool, align_to: Option<String>, )

Source

pub fn puts_local_label(&mut self, label: &str)

Source

pub fn code_origin(&mut self, text: String)

Source

pub fn comment(&mut self, text: String)

Source

pub fn annotation(&mut self, text: String)

Source

pub fn put_local_annotation(&mut self)

Source

pub fn put_global_annotation(&mut self)

Source

pub fn new_uid(&mut self) -> usize

Source

pub fn template(&self) -> String

Trait Implementations§

Source§

impl Debug for AsmEmitter

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AsmEmitter

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.