diff options
Diffstat (limited to 'isa')
-rw-r--r-- | isa/rv64ua/lrsc.S | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/isa/rv64ua/lrsc.S b/isa/rv64ua/lrsc.S index f73a404..c7589d7 100644 --- a/isa/rv64ua/lrsc.S +++ b/isa/rv64ua/lrsc.S @@ -28,12 +28,18 @@ bltu a1, a3, 1b # make sure that sc without a reservation fails. TEST_CASE( 2, a4, 1, \ la a0, foo; \ - sc.w a4, x0, (a0); \ + li a5, 0xdeadbeef; \ + sc.w a4, a5, (a0); \ +) + +# make sure the failing sc did not commit into memory +TEST_CASE( 3, a4, 0, \ + lw a4, foo; \ ) # make sure that sc with the wrong reservation fails. # TODO is this actually mandatory behavior? -TEST_CASE( 3, a4, 1, \ +TEST_CASE( 4, a4, 1, \ la a0, foo; \ la a1, fooTest3; \ lr.w a1, (a1); \ @@ -62,7 +68,7 @@ blt a1, a3, 1b fence # expected result is 512*ncores*(ncores+1) -TEST_CASE( 4, a0, 0, \ +TEST_CASE( 5, a0, 0, \ lw a0, foo; \ slli a1, a3, LOG_ITERATIONS-1; \ 1:sub a0, a0, a1; \ @@ -71,7 +77,7 @@ TEST_CASE( 4, a0, 0, \ ) # make sure that sc-after-successful-sc fails. -TEST_CASE( 5, a1, 1, \ +TEST_CASE( 6, a1, 1, \ la a0, foo; \ 1:lr.w a1, (a0); \ sc.w a1, x0, (a0); \ |