From f67bd4a5a8ed680b37f1716d0a5fda3fcb0b5c05 Mon Sep 17 00:00:00 2001 From: Keizaal Date: Wed, 26 Oct 2022 14:59:37 +0200 Subject: [PATCH] imported decode.rs in print.rs to use structure Instruction --- src/print.rs | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/src/print.rs b/src/print.rs index 13a54d0..65ef08f 100644 --- a/src/print.rs +++ b/src/print.rs @@ -1,30 +1,4 @@ -pub struct Instruction { - 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, -} +mod decode.rs const RISCV_LUI: u8 = 0x37; const RISCV_AUIPC: u8 = 0x17;