Skip to content

Custom Test sc.w failing: # cp_custom_sc_addresses

The signature should succeed and output a 0, but instead it outputs a 1 for this test:

cp_custom_sc_addresses

# loop over distances of 0 to 120 from lr to sc address
li t6, 0        # initialize offset to 0

1: add t5, t0, t6 # scratch address + offset lr.w t1, (t0) # load from reservation set sc.w t1, t3, (t5) # try store conditional, should succeed if in same set RVTEST_SIGUPD(SIGPOINTER, t1) sc.w t1, t3, (t5) # try again, and it should fail this time RVTEST_SIGUPD(SIGPOINTER, t1)

But if I change the line after the 1: for -> add t5, t0, x0 or addi t5, t0, 0 -> it succeds and output 0. It should succeed with the current code, but it's not, so I'm confused on why its failing