imported decode.rs in print.rs to use structure Instruction
This commit is contained in:
parent
0fae719c4c
commit
f67bd4a5a8
28
src/print.rs
28
src/print.rs
@ -1,30 +1,4 @@
|
|||||||
pub struct Instruction {
|
mod decode.rs
|
||||||
value : u64,
|
|
||||||
|
|
||||||
opcode : u8,
|
|
||||||
rs1 : u8,
|
|
||||||
rs2 : u8,
|
|
||||||
rs3 : u8,
|
|
||||||
rd : u8,
|
|
||||||
funct7 : u8,
|
|
||||||
funct7_smaller : u8,
|
|
||||||
funct3 : u8,
|
|
||||||
shamt : u8,
|
|
||||||
|
|
||||||
imm12_I : u16,
|
|
||||||
imm12_S : u16,
|
|
||||||
|
|
||||||
imm12_I_signed : i16,
|
|
||||||
imm12_S_signed : i16,
|
|
||||||
imm13 : i16,
|
|
||||||
imm13_signed : i16,
|
|
||||||
|
|
||||||
imm31_12 : u32,
|
|
||||||
imm21_1 : u32,
|
|
||||||
|
|
||||||
imm31_12_signed : i32,
|
|
||||||
imm21_1_signed : i32,
|
|
||||||
}
|
|
||||||
|
|
||||||
const RISCV_LUI: u8 = 0x37;
|
const RISCV_LUI: u8 = 0x37;
|
||||||
const RISCV_AUIPC: u8 = 0x17;
|
const RISCV_AUIPC: u8 = 0x17;
|
||||||
|
Loading…
Reference in New Issue
Block a user