[−][src]Struct dynasm::State
This struct contains all non-parsing state that dynasm! requires while parsing and compiling
Fields
stmts: &'a mut Vec<Stmt>
target: &'a str
file_data: &'a mut DynasmData
Trait Implementations
impl<'_> AssembleX64 for State<'_>
[src]
fn compile_instruction(
&mut self,
arch: &Archx64,
instruction: InstructionX64
) -> Result<(), Error>
[src]
&mut self,
arch: &Archx64,
instruction: InstructionX64
) -> Result<(), Error>
fn build_instruction(
&mut self,
_: &Archx64,
_: InstructionX64
) -> Result<(), Error> where
Self: BasicExprBuilder,
[src]
&mut self,
_: &Archx64,
_: InstructionX64
) -> Result<(), Error> where
Self: BasicExprBuilder,
impl<'_> AssembleX86 for State<'_>
[src]
fn compile_instruction(
&mut self,
arch: &Archx86,
instruction: InstructionX86
) -> Result<(), Error>
[src]
&mut self,
arch: &Archx86,
instruction: InstructionX86
) -> Result<(), Error>
fn build_instruction(
&mut self,
_: &Archx86,
_: InstructionX86
) -> Result<(), Error> where
Self: BasicExprBuilder,
[src]
&mut self,
_: &Archx86,
_: InstructionX86
) -> Result<(), Error> where
Self: BasicExprBuilder,
impl<'_> BasicExprBuilder for State<'_>
[src]
A simple implementation of a BasicExprBuilder
.
It can not combine any expressions, pushes statements into a Vec
and emits errors onto
standard error directly.
fn push(&mut self, stmt: Stmt)
[src]
fn emit_error_at(&mut self, _: ErrorSpan, args: Arguments)
[src]
Emits the error message on stderr
.
fn bit_or(&mut self, _: Expr, _: Value) -> Option<Expr>
[src]
fn bit_and(&mut self, _: Expr, _: Value) -> Option<Expr>
[src]
fn bit_xor(&mut self, _: Expr, _: Value) -> Option<Expr>
[src]
fn add(&mut self, _: Expr, _: Value) -> Option<Expr>
[src]
fn mul(&mut self, _: Expr, _: Value) -> Option<Expr>
[src]
fn neg(&mut self, _: Expr) -> Option<Expr>
[src]
fn log2(&mut self, _: Expr) -> Option<Expr>
[src]
fn mask_shift(&mut self, _: Expr, _: u64, _: i8) -> Option<Expr>
[src]
Auto Trait Implementations
impl<'a> !RefUnwindSafe for State<'a>
impl<'a> Send for State<'a>
impl<'a> !Sync for State<'a>
impl<'a> Unpin for State<'a>
impl<'a> !UnwindSafe for State<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BasicExprBuilderExt for T where
T: BasicExprBuilder + ?Sized,
[src]
T: BasicExprBuilder + ?Sized,
fn bit_or_else_err(&mut self, a: Expr, b: Value) -> Result<Expr, Error>
[src]
fn bit_and_else_err(&mut self, a: Expr, b: Value) -> Result<Expr, Error>
[src]
fn bit_xor_else_err(&mut self, a: Expr, b: Value) -> Result<Expr, Error>
[src]
fn neg_else_err(&mut self, a: Expr) -> Result<Expr, Error>
[src]
fn add_else_err(&mut self, a: Expr, b: Value) -> Result<Expr, Error>
[src]
fn mul_else_err(&mut self, a: Expr, b: Value) -> Result<Expr, Error>
[src]
fn add_many(&mut self, iter: impl IntoIterator<Item = Expr>) -> Option<Value>
[src]
fn add_many_else_err(
&mut self,
iter: impl IntoIterator<Item = Expr>
) -> Result<Value, Error>
[src]
&mut self,
iter: impl IntoIterator<Item = Expr>
) -> Result<Value, Error>
fn mask_shift_or(
&mut self,
reg: Value,
val: Expr,
mask: u64,
shift: i8
) -> Option<Expr>
[src]
&mut self,
reg: Value,
val: Expr,
mask: u64,
shift: i8
) -> Option<Expr>
fn mask_shift_or_else_err(
&mut self,
reg: Value,
val: Expr,
mask: u64,
shift: i8
) -> Result<Expr, Error>
[src]
&mut self,
reg: Value,
val: Expr,
mask: u64,
shift: i8
) -> Result<Expr, Error>
fn mask_shift_inverted_and(
&mut self,
reg: Value,
val: Expr,
mask: u64,
shift: i8
) -> Option<Expr>
[src]
&mut self,
reg: Value,
val: Expr,
mask: u64,
shift: i8
) -> Option<Expr>
fn mask_shift_inverted_and_else_err(
&mut self,
reg: Value,
val: Expr,
mask: u64,
shift: i8
) -> Result<Expr, Error>
[src]
&mut self,
reg: Value,
val: Expr,
mask: u64,
shift: i8
) -> Result<Expr, Error>
fn log2_else_err(&mut self, a: Expr) -> Result<Expr, Error>
[src]
fn dynscale(&mut self, _: Expr, _: Value) -> Result<(Expr, Expr), Error>
[src]
fn mask_shift_else_err(
&mut self,
val: Expr,
mask: u64,
shift: i8
) -> Result<Expr, Error>
[src]
&mut self,
val: Expr,
mask: u64,
shift: i8
) -> Result<Expr, Error>
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,