From bc4c5f3c2eb2b422a09d03373acb0b09c82d5a28 Mon Sep 17 00:00:00 2001 From: Clo91eaf Date: Fri, 31 May 2024 15:46:07 +0800 Subject: [PATCH] [cpu] open the disasm config --- src/cpu.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cpu.rs b/src/cpu.rs index 2ea2b8e..d509683 100644 --- a/src/cpu.rs +++ b/src/cpu.rs @@ -1011,12 +1011,12 @@ impl Cpu { /// Execute a general-purpose instruction. Raises an exception if something is wrong, /// otherwise, returns a fetched instruction. It also increments the program counter by 4 bytes. fn execute_general(&mut self, inst: u64) -> Result<(), Exception> { - // match self.inst.set_bits(inst as u32) { - // Ok(_) => {} - // Err(_) => { - // panic!("unknown inst, pc: {:x}, inst: {:x}", self.pc, self.inst.bits); - // } - // } + match self.inst.set_bits(inst as u32) { + Ok(_) => {} + Err(_) => { + panic!("unknown inst, pc: {:x}, inst: {:x}", self.pc, self.inst.bits); + } + } // 2. Decode. let opcode = inst & 0x0000007f; // let rd = self.inst.rd as u64;