FPU: prevent a coprocessor divide/sqrt from corrupting scalar FP registers - #3813
Open
emiliengnr wants to merge 1 commit into
Open
FPU: prevent a coprocessor divide/sqrt from corrupting scalar FP registers#3813emiliengnr wants to merge 1 commit into
emiliengnr wants to merge 1 commit into
Conversation
|
|
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.
Hello, here is a pull request for a bug I found.
In
src/main/scala/tile/FPU.scalathe shared divide/sqrt writeback selects its address anddata with
divSqrt_wenand uses them for both the scalar register file and the coprocessorresponse, without checking whether the completion belongs to the coprocessor. A coprocessor
divide/sqrt result can therefore land in a scalar FP register, either when no scalar write
is pending or when a scalar pipelined result writes back on the same cycle and loses the
shared address and data. The fix gives the scalar write separate sources selected only for a
scalar divide/sqrt (
divSqrt_wen && !divSqrt_cp) and leavesio.cp_respunchanged, matchingthe
!wbInfo(0).cpguard the pipelined path already uses. It is reachable on any core thatattaches a coprocessor on the shared divide/sqrt path, and was found with the Saturn vector
unit as Rocket's coprocessor.
Related issue: none
Type of change: bug report
Impact: no functional change
Development Phase: implementation
Release Notes
Fixed the shared FPU divide/sqrt writeback so a coprocessor divide/sqrt result no longer corrupts a scalar floating-point register.