Improve exception dumps and general debug info, make the emulator capable of running the riscv ISA tests, and perform some general fixes i found while making it pass the tests for RV64I

This commit is contained in:
2025-12-30 20:18:23 +01:00
parent 6a0e5e63c1
commit 5a383956c9
6 changed files with 36 additions and 7 deletions

View File

@@ -164,7 +164,7 @@ impl Core {
let instr = Instruction(instr);
if let Err(e) = find_and_exec(instr, self) {
eprintln!("instr: {:08x}", instr.0);
dbg!(instr);
return Err(e);
}
@@ -174,6 +174,7 @@ impl Core {
fn throw_exception(&mut self, exception: Exception) {
eprintln!("Exception: {exception:?}");
dbg!(self.pc, self.x_regs);
dbg!(self.x_regs[10]);
}
pub fn reset(&mut self, pc: u64) {