Fix M-extension funct7 decoding - #358
Conversation
Review (maintainer)Verified on master @ 1c3403d: the bug is live at Why CI never caught it: no compiler emits reserved encodings, and no test in the tree exercises them — CI only ever sees canonical funct7 values. A conform test that executes a reserved-funct7 word via Code review: one-line change, matches the C++ guidelines; the other Note on merging: this branch carries the pre-3.0 history (no common ancestor with today's master), so it will be squash-merged to keep master's history clean — your authorship is preserved in the squashed commit. Accepting. |
tinebp
left a comment
There was a problem hiding this comment.
Verified locally: rv32um ISA suite + full simx regression pass; decode now matches the RTL's exact funct7 case-match.
|
CI coverage for this fix landed in #398 — a conform test executing a reserved funct7 encoding and asserting the RTL-matching decode (validated to fail under the pre-fix behavior). |
Follow-up to vortexgpgpu#358: executes a reserved OP encoding (funct7=0x3, funct3=0) via .insn and asserts the RTL-matching base-ALU decode (ADD). Under the pre-vortexgpgpu#358 SimX bug this word ran as MUL (r=63 instead of 16), so the test locks the SimX<->RTL decode parity in for CI (kernel category, simx + rtlsim, both XLENs). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Previously it used
(funct7 & 0x1), which could decode reserved oddfunct7values as M-extension instructions while RTL requires the exact7'b0000001encoding. This masked illegal instructions instead of triggering abort().