-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If bundled instructions both write to the same register, throw an error
- Loading branch information
Showing
7 changed files
with
82 additions
and
19 deletions.
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
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,11 @@ | ||
# | ||
# Tests two enabled instructions cannot be bundled if they write to the same register | ||
# | ||
|
||
.word 100; | ||
addi r1 = r0, 1 || addi r1 = r0, 2; | ||
halt; | ||
nop; | ||
nop; | ||
nop; | ||
|
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,14 @@ | ||
# | ||
# Tests bundled instructions can write to the same register if they are not both enabled. | ||
# | ||
|
||
.word 100; | ||
pand p1 = p0, p0; | ||
pand p2 = p0, !p0; | ||
(p1) addi r1 = r0, 16 || (p2) subi r1 = r0, 5; | ||
(p2) addi r2 = r1, 16 || (p1) subi r2 = r1, 5; | ||
halt; | ||
nop; | ||
nop; | ||
nop; | ||
|
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,19 @@ | ||
# | ||
# Tests bundled instructions can write to the same register if they are not both enabled. | ||
# This test ensures that if the predicates where both enabled originally, and then one disabled | ||
# right before the bundle, it will work correctly. | ||
# | ||
# I.e., this is a test that the pipelining is correctly accounted for in the check for the predicates and writes. | ||
# | ||
|
||
.word 100; | ||
pand p1 = p0, p0 || pand p2 = p0, p0; | ||
pand p1 = p0, p0 || pand p2 = p0, p0; | ||
pand p1 = p0, p0 || pand p2 = p0, p0; | ||
pand p1 = p0, p0 || pand p2 = p0, !p0; | ||
(p1) addi r1 = r0, 32 || (p2) subi r1 = r0, 5; | ||
halt; | ||
nop; | ||
nop; | ||
nop; | ||
|