pub enum Instruction {
}Variants§
Lui(UType)
Jal(JType)
Jalr(IType)
Beq(BType)
Ld(IType)
Sd(SType)
Addi(IType)
Add(RType)
Sub(RType)
Sltu(RType)
Mul(RType)
Divu(RType)
Remu(RType)
Ecall(IType)
Implementations§
Source§impl Instruction
impl Instruction
pub fn new_nop() -> Instruction
pub fn new_add(rd: Register, rs1: Register, rs2: Register) -> Instruction
pub fn new_sub(rd: Register, rs1: Register, rs2: Register) -> Instruction
pub fn new_mul(rd: Register, rs1: Register, rs2: Register) -> Instruction
pub fn new_divu(rd: Register, rs1: Register, rs2: Register) -> Instruction
pub fn new_remu(rd: Register, rs1: Register, rs2: Register) -> Instruction
pub fn new_sltu(rd: Register, rs1: Register, rs2: Register) -> Instruction
pub fn new_addi(rd: Register, rs1: Register, immediate: i32) -> Instruction
pub fn new_ld(rd: Register, rs1: Register, immediate: i32) -> Instruction
pub fn new_ecall() -> Instruction
pub fn new_jalr(rd: Register, rs1: Register, immediate: i32) -> Instruction
pub fn new_sd(rs1: Register, rs2: Register, immediate: i32) -> Instruction
pub fn new_beq(rs1: Register, rs2: Register, immediate: i32) -> Instruction
pub fn new_jal(rd: Register, immediate: i32) -> Instruction
pub fn new_lui(rd: Register, immediate: i32) -> Instruction
Trait Implementations§
Source§impl Clone for Instruction
impl Clone for Instruction
Source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Instruction
impl Debug for Instruction
Source§impl Hash for Instruction
impl Hash for Instruction
Source§impl PartialEq for Instruction
impl PartialEq for Instruction
impl Copy for Instruction
impl Eq for Instruction
impl StructuralPartialEq for Instruction
Auto Trait Implementations§
impl Freeze for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnwindSafe for Instruction
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