pub struct BigNatCodegen { /* private fields */ }Expand description
Generates code for arbitrary-precision natural number (BigNat) operations.
Implementations§
Source§impl BigNatCodegen
impl BigNatCodegen
Sourcepub fn emit_add(&mut self, lhs: Register, rhs: Register) -> Vec<NativeInst>
pub fn emit_add(&mut self, lhs: Register, rhs: Register) -> Vec<NativeInst>
Emit BigNat addition.
Sourcepub fn emit_mul(&mut self, lhs: Register, rhs: Register) -> Vec<NativeInst>
pub fn emit_mul(&mut self, lhs: Register, rhs: Register) -> Vec<NativeInst>
Emit BigNat multiplication.
Sourcepub fn emit_sub(&mut self, lhs: Register, rhs: Register) -> Vec<NativeInst>
pub fn emit_sub(&mut self, lhs: Register, rhs: Register) -> Vec<NativeInst>
Emit BigNat subtraction (saturating at zero).
Sourcepub fn emit_div(&mut self, lhs: Register, rhs: Register) -> Vec<NativeInst>
pub fn emit_div(&mut self, lhs: Register, rhs: Register) -> Vec<NativeInst>
Emit BigNat division.
Sourcepub fn emit_cmp(&mut self, lhs: Register, rhs: Register) -> Vec<NativeInst>
pub fn emit_cmp(&mut self, lhs: Register, rhs: Register) -> Vec<NativeInst>
Emit BigNat comparison (returns -1, 0, or 1).
Sourcepub fn emit_of_u64(&mut self, val: i64) -> Vec<NativeInst>
pub fn emit_of_u64(&mut self, val: i64) -> Vec<NativeInst>
Emit conversion from a small native integer to BigNat.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BigNatCodegen
impl RefUnwindSafe for BigNatCodegen
impl Send for BigNatCodegen
impl Sync for BigNatCodegen
impl Unpin for BigNatCodegen
impl UnsafeUnpin for BigNatCodegen
impl UnwindSafe for BigNatCodegen
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more