diff options
| author | taitep <taitep@taitep.se> | 2025-12-22 19:57:33 +0100 |
|---|---|---|
| committer | taitep <taitep@taitep.se> | 2025-12-22 19:57:33 +0100 |
| commit | ae57cdc69164b4426edc03564d32c0b8ecc72612 (patch) | |
| tree | b10324f133bed75c3e792a4884ee0df515e89705 /src/core.rs | |
| parent | bac68d7118fdca1b06ad3349f7b6da9b89d0f63a (diff) | |
Improve the debug messages when invalid instructions are found
Diffstat (limited to 'src/core.rs')
| -rw-r--r-- | src/core.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core.rs b/src/core.rs index 27ccf3f..2596441 100644 --- a/src/core.rs +++ b/src/core.rs @@ -53,6 +53,11 @@ impl Core { } }; + if instr == 0 { + eprintln!("Executing 0 instruction at {:X}", self.pc); + break; + } + assert_eq!(instr & 3, 3, "Compressed instructions not supported"); let instr = Instruction(instr); @@ -73,7 +78,7 @@ impl Core { } } } else { - eprintln!("Invalid Instruction 0x{:08x} 0b{:032b}", instr.0, instr.0); + eprintln!("Invalid Instruction {:08x}", instr.0); break; } } |
