Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix false-positive FP data hazards #2945

Merged
merged 1 commit into from
Mar 15, 2022
Merged

Conversation

a0u
Copy link
Member

@a0u a0u commented Mar 14, 2022

Related issue:

Type of change: other enhancement

Impact:

Development Phase: implementation

Release Notes

Avoid false RAW/WAW hazards for integer instructions that access an x register whose numeric specifier coincides with the f register destination of an earlier floating-point instruction.

Example testcase:

fmv.w.x f10, zero
addi x10, x10, 1

It appears this phenomenon is not uncommon in compiled code since gcc's register allocator frequently tends to use a0-a7 (x10-x17) and fa0-fa7 (f10-f17) as temporaries.

Avoid unnecessarily stalling integer instructions that access an x
register whose numeric specifier coincides with the f register
destination of an earlier floating-point instruction.
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 14, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: a0u / name: Albert Ou (e99b672)

@a0u
Copy link
Member Author

a0u commented Mar 14, 2022

Another solution is to set wen/ren1/ren2/ren3 in FPUCtrlSigs to N instead of X for non-floating-point instructions.

val default = List(X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X)

@aswaterman
Copy link
Member

The original proposal is probably less HW than changing the decoder.

@aswaterman aswaterman merged commit f544995 into chipsalliance:master Mar 15, 2022
@a0u a0u deleted the fp-hazard branch March 16, 2022 04:27
sequencer added a commit that referenced this pull request Feb 11, 2023
sequencer added a commit that referenced this pull request Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants