Improve the debug messages when invalid instructions are found
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user