Skip to content

Commit

Permalink
Augment LR/SC test to test that SC-after-failed-SC fails
Browse files Browse the repository at this point in the history
  • Loading branch information
aswaterman committed Apr 7, 2023
1 parent aaae4e7 commit 394937e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions isa/rv64ua/lrsc.S
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,15 @@ TEST_CASE( 5, a0, 0, \
)

# make sure that sc-after-successful-sc fails.
TEST_CASE( 6, a1, 1, \
TEST_CASE( 6, a1, 2, \
la a0, foo; \
1:lr.w a1, (a0); \
sc.w a1, x0, (a0); \
bnez a1, 1b; \
sc.w a1, x0, (a0)
sc.w a1, x0, (a0); \
/* make sure that sc-after-failed-sc fails, too */ \
sc.w a2, x0, (a0); \
add a1, a1, a2
)

TEST_PASSFAIL
Expand Down

0 comments on commit 394937e

Please sign in to comment.