pub enum Rv32Instruction<Hart>where
Hart: HartConfig,{
Show 42 variants
Add {
rs1: Hart::Reg,
rs2: Hart::Reg,
rd: Hart::Reg,
},
Sub {
rs1: Hart::Reg,
rs2: Hart::Reg,
rd: Hart::Reg,
},
Sll {
rs1: Hart::Reg,
rs2: Hart::Reg,
rd: Hart::Reg,
},
Slt {
rs1: Hart::Reg,
rs2: Hart::Reg,
rd: Hart::Reg,
},
Sltu {
rs1: Hart::Reg,
rs2: Hart::Reg,
rd: Hart::Reg,
},
Xor {
rs1: Hart::Reg,
rs2: Hart::Reg,
rd: Hart::Reg,
},
Srl {
rs1: Hart::Reg,
rs2: Hart::Reg,
rd: Hart::Reg,
},
Sra {
rs1: Hart::Reg,
rs2: Hart::Reg,
rd: Hart::Reg,
},
Or {
rs1: Hart::Reg,
rs2: Hart::Reg,
rd: Hart::Reg,
},
And {
rs1: Hart::Reg,
rs2: Hart::Reg,
rd: Hart::Reg,
},
Addi {
rs1: Hart::Reg,
rd: Hart::Reg,
imm: i16,
/* private fields */
},
Slti {
rs1: Hart::Reg,
rd: Hart::Reg,
imm: i16,
/* private fields */
},
Sltiu {
rs1: Hart::Reg,
rd: Hart::Reg,
imm: i16,
/* private fields */
},
Xori {
rs1: Hart::Reg,
rd: Hart::Reg,
imm: i16,
/* private fields */
},
Ori {
rs1: Hart::Reg,
rd: Hart::Reg,
imm: i16,
/* private fields */
},
Andi {
rs1: Hart::Reg,
rd: Hart::Reg,
imm: i16,
/* private fields */
},
Slli {
rs1: Hart::Reg,
rd: Hart::Reg,
shamt: Shamt<u32>,
/* private fields */
},
Srli {
rs1: Hart::Reg,
rd: Hart::Reg,
shamt: Shamt<u32>,
/* private fields */
},
Srai {
rs1: Hart::Reg,
rd: Hart::Reg,
shamt: Shamt<u32>,
/* private fields */
},
Lb {
rs1: Hart::Reg,
rd: Hart::Reg,
imm: i16,
/* private fields */
},
Lh {
rs1: Hart::Reg,
rd: Hart::Reg,
imm: i16,
/* private fields */
},
Lw {
rs1: Hart::Reg,
rd: Hart::Reg,
imm: i16,
/* private fields */
},
Lbu {
rs1: Hart::Reg,
rd: Hart::Reg,
imm: i16,
/* private fields */
},
Lhu {
rs1: Hart::Reg,
rd: Hart::Reg,
imm: i16,
/* private fields */
},
Jalr {
rs1: Hart::Reg,
rd: Hart::Reg,
imm: i16,
/* private fields */
},
Sb {
rs1: Hart::Reg,
rs2: Hart::Reg,
imm: i16,
},
Sh {
rs1: Hart::Reg,
rs2: Hart::Reg,
imm: i16,
},
Sw {
rs1: Hart::Reg,
rs2: Hart::Reg,
imm: i16,
},
Beq {
rs1: Hart::Reg,
rs2: Hart::Reg,
imm: i16,
},
Bne {
rs1: Hart::Reg,
rs2: Hart::Reg,
imm: i16,
},
Blt {
rs1: Hart::Reg,
rs2: Hart::Reg,
imm: i16,
},
Bge {
rs1: Hart::Reg,
rs2: Hart::Reg,
imm: i16,
},
Bltu {
rs1: Hart::Reg,
rs2: Hart::Reg,
imm: i16,
},
Bgeu {
rs1: Hart::Reg,
rs2: Hart::Reg,
imm: i16,
},
Lui {
rd: Hart::Reg,
imm: I24WithZeroedBits</* LITERAL */>,
/* private fields */
},
Auipc {
rd: Hart::Reg,
imm: I24WithZeroedBits</* LITERAL */>,
/* private fields */
},
Jal {
rd: Hart::Reg,
imm: I24,
/* private fields */
},
Fence {
pred: u8,
succ: u8,
/* private fields */
},
FenceTso { /* private fields */ },
Ecall { /* private fields */ },
Ebreak { /* private fields */ },
Unimp { /* private fields */ },
}Expand description
RISC-V RV32 instruction
Variants§
Add
Sub
Sll
Slt
Sltu
Xor
Srl
Sra
Or
And
Addi
Slti
Sltiu
Xori
Ori
Andi
Slli
Srli
Srai
Lb
Lh
Lw
Lbu
Lhu
Jalr
Sb
Sh
Sw
Beq
Bne
Blt
Bge
Bltu
Bgeu
Lui
Auipc
Jal
Fence
FenceTso
Ecall
Ebreak
Unimp
Trait Implementations§
Source§impl<Hart> Clone for Rv32Instruction<Hart>
impl<Hart> Clone for Rv32Instruction<Hart>
Source§fn clone(&self) -> Rv32Instruction<Hart>
fn clone(&self) -> Rv32Instruction<Hart>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<Hart> Copy for Rv32Instruction<Hart>
Source§impl<Hart> Debug for Rv32Instruction<Hart>
impl<Hart> Debug for Rv32Instruction<Hart>
§impl<Reg, Hart> Display for Rv32Instruction<Hart>where
Reg: Display,
Hart: HartConfig<Reg = Reg>,
impl<Reg, Hart> Display for Rv32Instruction<Hart>where
Reg: Display,
Hart: HartConfig<Reg = Reg>,
impl<Hart> Eq for Rv32Instruction<Hart>
§impl<Reg, Hart> Instruction for Rv32Instruction<Hart>
impl<Reg, Hart> Instruction for Rv32Instruction<Hart>
§const IMPLEMENTED_EXTENSIONS: &'static [ImplementedExtension]
const IMPLEMENTED_EXTENSIONS: &'static [ImplementedExtension]
All implemented extensions, including this instruction itself, with their ISA extensions. Read more
§const OWN_ISA_EXTENSIONS: &'static [IsaExtension]
const OWN_ISA_EXTENSIONS: &'static [IsaExtension]
ISA extensions defined by this instruction enum itself, without inherited ones. Read more
§fn try_decode(instruction: u32) -> Option<Self>
fn try_decode(instruction: u32) -> Option<Self>
Try to decode a single valid instruction
Source§const ISA_STRING: &'static str = _
const ISA_STRING: &'static str = _
ISA string as used in the
Tag_RISCV_arch attribute of ELF files, for example,
rv64i2p1_m2p0_zmmul1p0. Read moreSource§fn implements_extension<E>() -> boolwhere
E: Instruction<Hart = Self::Hart>,
fn implements_extension<E>() -> boolwhere
E: Instruction<Hart = Self::Hart>,
Checks whether this instruction implements the given extension, see
Self::IMPLEMENTED_EXTENSIONS for detailsSource§impl<Hart> PartialEq for Rv32Instruction<Hart>
impl<Hart> PartialEq for Rv32Instruction<Hart>
impl<Hart> StructuralPartialEq for Rv32Instruction<Hart>
Auto Trait Implementations§
impl<Hart> Freeze for Rv32Instruction<Hart>
impl<Hart> RefUnwindSafe for Rv32Instruction<Hart>
impl<Hart> Send for Rv32Instruction<Hart>
impl<Hart> Sync for Rv32Instruction<Hart>
impl<Hart> Unpin for Rv32Instruction<Hart>
impl<Hart> UnsafeUnpin for Rv32Instruction<Hart>
impl<Hart> UnwindSafe for Rv32Instruction<Hart>
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