[hardware] Add single core LRSC test
A test for a successful LRSC was missing.
@@ -34,6 +34,24 @@ TEST_CASE( 4, a4, 1, \
sc.w a4, a1, (a0); \
)
+# try a simple lr sc
+TEST_CASE( 5, a4, 0, \
+ la a1, fooTest3; \
+ li a5, 1; \
+ lr.w a0, (a1); \
+ sc.w a4, a5, (a1); \
+)
+
+# make sure that sc-after-successful-sc fails.
+TEST_CASE( 6, a1, 1, \
+ la a0, foo; \
+ li a5, 0xdeadbeef; \
+ lr.w a1, (a0); \
+ sc.w a1, a5, (a0); \
+ sc.w a1, a5, (a0); \
+ )
+
+
TEST_PASSFAIL
RVTEST_CODE_END
