aboutsummaryrefslogtreecommitdiff
path: root/src/a.tex
diff options
context:
space:
mode:
Diffstat (limited to 'src/a.tex')
-rw-r--r--src/a.tex5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/a.tex b/src/a.tex
index c4a8d26..2502b43 100644
--- a/src/a.tex
+++ b/src/a.tex
@@ -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.