pub enum Rv64Instruction<Reg> {
Show 54 variants
Add {
rd: Reg,
rs1: Reg,
rs2: Reg,
},
Sub {
rd: Reg,
rs1: Reg,
rs2: Reg,
},
Sll {
rd: Reg,
rs1: Reg,
rs2: Reg,
},
Slt {
rd: Reg,
rs1: Reg,
rs2: Reg,
},
Sltu {
rd: Reg,
rs1: Reg,
rs2: Reg,
},
Xor {
rd: Reg,
rs1: Reg,
rs2: Reg,
},
Srl {
rd: Reg,
rs1: Reg,
rs2: Reg,
},
Sra {
rd: Reg,
rs1: Reg,
rs2: Reg,
},
Or {
rd: Reg,
rs1: Reg,
rs2: Reg,
},
And {
rd: Reg,
rs1: Reg,
rs2: Reg,
},
Addw {
rd: Reg,
rs1: Reg,
rs2: Reg,
},
Subw {
rd: Reg,
rs1: Reg,
rs2: Reg,
},
Sllw {
rd: Reg,
rs1: Reg,
rs2: Reg,
},
Srlw {
rd: Reg,
rs1: Reg,
rs2: Reg,
},
Sraw {
rd: Reg,
rs1: Reg,
rs2: Reg,
},
Addi {
rd: Reg,
rs1: Reg,
imm: i32,
},
Slti {
rd: Reg,
rs1: Reg,
imm: i32,
},
Sltiu {
rd: Reg,
rs1: Reg,
imm: i32,
},
Xori {
rd: Reg,
rs1: Reg,
imm: i32,
},
Ori {
rd: Reg,
rs1: Reg,
imm: i32,
},
Andi {
rd: Reg,
rs1: Reg,
imm: i32,
},
Slli {
rd: Reg,
rs1: Reg,
shamt: u32,
},
Srli {
rd: Reg,
rs1: Reg,
shamt: u32,
},
Srai {
rd: Reg,
rs1: Reg,
shamt: u32,
},
Addiw {
rd: Reg,
rs1: Reg,
imm: i32,
},
Slliw {
rd: Reg,
rs1: Reg,
shamt: u32,
},
Srliw {
rd: Reg,
rs1: Reg,
shamt: u32,
},
Sraiw {
rd: Reg,
rs1: Reg,
shamt: u32,
},
Lb {
rd: Reg,
rs1: Reg,
imm: i32,
},
Lh {
rd: Reg,
rs1: Reg,
imm: i32,
},
Lw {
rd: Reg,
rs1: Reg,
imm: i32,
},
Ld {
rd: Reg,
rs1: Reg,
imm: i32,
},
Lbu {
rd: Reg,
rs1: Reg,
imm: i32,
},
Lhu {
rd: Reg,
rs1: Reg,
imm: i32,
},
Lwu {
rd: Reg,
rs1: Reg,
imm: i32,
},
Jalr {
rd: Reg,
rs1: Reg,
imm: i32,
},
Sb {
rs2: Reg,
rs1: Reg,
imm: i32,
},
Sh {
rs2: Reg,
rs1: Reg,
imm: i32,
},
Sw {
rs2: Reg,
rs1: Reg,
imm: i32,
},
Sd {
rs2: Reg,
rs1: Reg,
imm: i32,
},
Beq {
rs1: Reg,
rs2: Reg,
imm: i32,
},
Bne {
rs1: Reg,
rs2: Reg,
imm: i32,
},
Blt {
rs1: Reg,
rs2: Reg,
imm: i32,
},
Bge {
rs1: Reg,
rs2: Reg,
imm: i32,
},
Bltu {
rs1: Reg,
rs2: Reg,
imm: i32,
},
Bgeu {
rs1: Reg,
rs2: Reg,
imm: i32,
},
Lui {
rd: Reg,
imm: i32,
},
Auipc {
rd: Reg,
imm: i32,
},
Jal {
rd: Reg,
imm: i32,
},
Fence {
pred: u8,
succ: u8,
fm: u8,
},
Ecall,
Ebreak,
Unimp,
Invalid(u32),
}Expand description
RISC-V RV64 instruction
Variants§
Add
Sub
Sll
Slt
Sltu
Xor
Srl
Sra
Or
And
Addw
Subw
Sllw
Srlw
Sraw
Addi
Slti
Sltiu
Xori
Ori
Andi
Slli
Srli
Srai
Addiw
Slliw
Srliw
Sraiw
Lb
Lh
Lw
Ld
Lbu
Lhu
Lwu
Jalr
Sb
Sh
Sw
Sd
Beq
Bne
Blt
Bge
Bltu
Bgeu
Lui
Auipc
Jal
Fence
Ecall
Ebreak
Unimp
Invalid(u32)
Trait Implementations§
Source§impl<Reg> BaseInstruction for Rv64Instruction<Reg>
impl<Reg> BaseInstruction for Rv64Instruction<Reg>
Source§impl<Reg: Clone> Clone for Rv64Instruction<Reg>
impl<Reg: Clone> Clone for Rv64Instruction<Reg>
Source§fn clone(&self) -> Rv64Instruction<Reg>
fn clone(&self) -> Rv64Instruction<Reg>
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<Reg: Debug> Debug for Rv64Instruction<Reg>
impl<Reg: Debug> Debug for Rv64Instruction<Reg>
Source§impl<Reg> Display for Rv64Instruction<Reg>where
Reg: Display,
impl<Reg> Display for Rv64Instruction<Reg>where
Reg: Display,
Source§impl<Reg> Instruction for Rv64Instruction<Reg>
impl<Reg> Instruction for Rv64Instruction<Reg>
Source§type Base = Rv64Instruction<Reg>
type Base = Rv64Instruction<Reg>
Lower-level instruction like
Rv64InstructionSource§fn try_decode(instruction: u32) -> Option<Self>
fn try_decode(instruction: u32) -> Option<Self>
Try to decode a single valid instruction
Source§impl<Reg: PartialEq> PartialEq for Rv64Instruction<Reg>
impl<Reg: PartialEq> PartialEq for Rv64Instruction<Reg>
impl<Reg: Copy> Copy for Rv64Instruction<Reg>
impl<Reg: Eq> Eq for Rv64Instruction<Reg>
impl<Reg> StructuralPartialEq for Rv64Instruction<Reg>
Auto Trait Implementations§
impl<Reg> Freeze for Rv64Instruction<Reg>where
Reg: Freeze,
impl<Reg> RefUnwindSafe for Rv64Instruction<Reg>where
Reg: RefUnwindSafe,
impl<Reg> Send for Rv64Instruction<Reg>where
Reg: Send,
impl<Reg> Sync for Rv64Instruction<Reg>where
Reg: Sync,
impl<Reg> Unpin for Rv64Instruction<Reg>where
Reg: Unpin,
impl<Reg> UnwindSafe for Rv64Instruction<Reg>where
Reg: UnwindSafe,
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