Enum riscu::instruction::Instruction[][src]

pub enum Instruction {
    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),
}

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

impl Instruction[src]

pub fn new_nop() -> Instruction[src]

pub fn new_add(rd: Register, rs1: Register, rs2: Register) -> Instruction[src]

pub fn new_sub(rd: Register, rs1: Register, rs2: Register) -> Instruction[src]

pub fn new_mul(rd: Register, rs1: Register, rs2: Register) -> Instruction[src]

pub fn new_divu(rd: Register, rs1: Register, rs2: Register) -> Instruction[src]

pub fn new_remu(rd: Register, rs1: Register, rs2: Register) -> Instruction[src]

pub fn new_sltu(rd: Register, rs1: Register, rs2: Register) -> Instruction[src]

pub fn new_addi(rd: Register, rs1: Register, immediate: i32) -> Instruction[src]

pub fn new_ld(rd: Register, rs1: Register, immediate: i32) -> Instruction[src]

pub fn new_ecall() -> Instruction[src]

pub fn new_jalr(rd: Register, rs1: Register, immediate: i32) -> Instruction[src]

pub fn new_sd(rs1: Register, rs2: Register, immediate: i32) -> Instruction[src]

pub fn new_beq(rs1: Register, rs2: Register, immediate: i32) -> Instruction[src]

pub fn new_jal(rd: Register, immediate: i32) -> Instruction[src]

pub fn new_lui(rd: Register, immediate: i32) -> Instruction[src]

Trait Implementations

impl Clone for Instruction[src]

impl Copy for Instruction[src]

impl Debug for Instruction[src]

impl Eq for Instruction[src]

impl Hash for Instruction[src]

impl PartialEq<Instruction> for Instruction[src]

impl StructuralEq for Instruction[src]

impl StructuralPartialEq for Instruction[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.