diff options
| author | taitep <taitep@taitep.se> | 2025-10-07 20:16:27 +0200 |
|---|---|---|
| committer | taitep <taitep@taitep.se> | 2025-10-07 20:16:27 +0200 |
| commit | 361b36fbd1ba4a710abbc866da1c641545a6d53f (patch) | |
| tree | fc15d6dabe54100a299118a95d089a9f50965e7d /src/decode.rs | |
| parent | dbd022f9c9e7409e74059224431f57de6bec7238 (diff) | |
Make sure unsupported/illegal instructions are caught
Diffstat (limited to 'src/decode.rs')
| -rw-r--r-- | src/decode.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/decode.rs b/src/decode.rs index 409aedb..5e19ab9 100644 --- a/src/decode.rs +++ b/src/decode.rs @@ -12,7 +12,7 @@ impl Instruction { /// Returns the opcode of the instruction, with the last 2 bits stripped away, as they are always 0b11 in a non-compressed instruction pub fn opcode_noncompressed(&self) -> u8 { - debug_assert_eq!(self.0 & 0b11, 0b11); + debug_assert_eq!(self.0 & 0b11, 0b11, "Compressed (or invalid) opcode"); (self.0 >> 2 & 0x1f) as u8 } |
