-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: do not wipe EX on FP-induced WAW stalls (#649)
Fixes #304. * fix: do not wipe EX on FP-induced WAW stalls Similar to #305 (which originally fixed #304), add a check on whether EX is empty before inserting a BUBBLE instruction. Also add some more verbose logging to help reason about the flow without having to use a debugger. * test: add a regression test for issue 304 This test would have exposed the second reoccurrence of issue #304. Thanks to @hugmanrique for this code. * fix: fix merge conflict resolution error
- Loading branch information
Showing
3 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
; Thanks to @hugmanrique for this code. | ||
|
||
.data | ||
v: .space 256 | ||
w: .space 256 | ||
x: .double 2.0 | ||
y: .double 1.5 | ||
z: .double 0.0 | ||
|
||
.text | ||
daddi R1, R0, v | ||
daddi R2, R0, w | ||
daddi R3, R0, 256 | ||
|
||
ldc1 F2, x(R0) | ||
ldc1 F4, y(R0) | ||
daddi R4, R0, 0 | ||
|
||
loop1: | ||
dmtc1 R4, F6 | ||
daddi R4, R4, 8 | ||
cvt.d.l F6, F6 | ||
mul.d F8, F2, F6 | ||
mul.d F10, F4, F6 | ||
dmtc1 R4, F12 | ||
daddi R4, R4, 8 | ||
cvt.d.l F12, F12 | ||
mul.d F14, F2, F12 | ||
daddi R1, R1, 16 | ||
mul.d F8, F8, F8 | ||
daddi R2, R2, 16 | ||
|
||
sdc1 F10, -16(R2) | ||
mul.d F14, F14, F14 | ||
mul.d F16, F4, F12 | ||
sdc1 F8, -16(R1) ; here | ||
sdc1 F14, -8(R1) | ||
sdc1 F16, -8(R2) | ||
bne R4, R3, loop1 | ||
syscall 0 |