diff options
author | Andrew Waterman <andrew@sifive.com> | 2023-04-06 21:40:30 -0700 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2023-04-06 21:40:30 -0700 |
commit | 394937eceb62bc4ba8ad5a4e916f0508d9803229 (patch) | |
tree | 8eecd948f2ea9b49f182f2e07f774c195437c2fe /isa/rv64ua/lrsc.S | |
parent | aaae4e7d20831ac8383350ff8c859994012f3528 (diff) | |
download | riscv-tests-394937eceb62bc4ba8ad5a4e916f0508d9803229.zip riscv-tests-394937eceb62bc4ba8ad5a4e916f0508d9803229.tar.gz riscv-tests-394937eceb62bc4ba8ad5a4e916f0508d9803229.tar.bz2 |
Augment LR/SC test to test that SC-after-failed-SC fails
Diffstat (limited to 'isa/rv64ua/lrsc.S')
-rw-r--r-- | isa/rv64ua/lrsc.S | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/isa/rv64ua/lrsc.S b/isa/rv64ua/lrsc.S index 5711f8d..ab0d025 100644 --- a/isa/rv64ua/lrsc.S +++ b/isa/rv64ua/lrsc.S @@ -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 |