riscv: return after valid fcvtmod.w.d - #303
Open
carlosqwqqwq wants to merge 1 commit into
Open
Conversation
This was referenced Sep 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
riscv: return after valid fcvtmod.w.d
Fixes #294
Commit message
Description
The valid
fcvtmod.w.dpath writes the integer result and then falls through to the illegal-instruction path because it lacks a return. Add the missing return immediately after the architectural writeback. Reserved rounding-mode encodings continue to use the existing illegal path. The change is limited tosrc/cpu/riscv_fpu.c.This PR is independently applicable to
staging. PR #304 addresses theseparate modulo-conversion semantics in the same instruction, and no longer
contains this control-flow hunk; the two fixes can be reviewed and merged
independently.
Validation
0xc2801553and retires the legalrtzform; the patched RVVM also retires it withrd = 3and no internal illegal-instruction exception. A native RV64 reference without Zfa is recorded only as a capability boundary, not as the expected behaviour of RVVM's Zfa-enabled guest.