diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/a.tex | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -232,8 +232,9 @@ only take four instructions. cas: lr.w t0, (a0) # Load original value. bne t0, a1, fail # Doesn't match, so fail. - sc.w a0, a2, (a0) # Try to update. - bnez a0, cas # Retry if store-conditional failed. + sc.w t0, a2, (a0) # Try to update. + bnez t0, cas # Retry if store-conditional failed. + li a0, 0 # Set return to success. jr ra # Return. fail: li a0, 1 # Set return to failure. |