diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-05-03 00:01:30 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-05-03 00:01:30 +0200 |
| commit | 9b00df93c2f68ea8737aea88800ede3f92327f4b (patch) | |
| tree | a26d5be8db1ad866e74ccf54d5d7ceb0c2ee6daf /src | |
| parent | f1da71a8fe019368826d4cd50a7fdcf55c99d849 (diff) | |
| download | box64-9b00df93c2f68ea8737aea88800ede3f92327f4b.tar.gz box64-9b00df93c2f68ea8737aea88800ede3f92327f4b.zip | |
[LA64_DYNAREC] Fixing the fix, and leave a comment for future me in case I want to fix that again
Diffstat (limited to 'src')
| -rw-r--r-- | src/dynarec/la64/la64_lock.S | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dynarec/la64/la64_lock.S b/src/dynarec/la64/la64_lock.S index 293036ee..40934c9c 100644 --- a/src/dynarec/la64/la64_lock.S +++ b/src/dynarec/la64/la64_lock.S @@ -161,7 +161,7 @@ la64_lock_cas_d: ll.w $a3, $a0, 0 bne $a3, $a1, 16 sc.w $a2, $a0, 0 - li.d $a0, 0 + xori $a0, $a2, 1 ret li.d $a0, 1 ret @@ -170,7 +170,7 @@ la64_lock_cas_dd: ll.d $a3, $a0, 0 bne $a3, $a1, 1f sc.d $a2, $a0, 0 - li.d $a0, 0 + xori $a0, $a2, 1 // sc return success in $a2, overwriting it! 0 = fail, 1 = success 1: ret li.d $a0, 1 @@ -180,8 +180,9 @@ la64_lock_cas_dq: ll.d $a4, $a0, 0 bne $a4, $a2, 1f sc.d $a1, $a0, 0 + beqz $a1, 1f st.d $a3, $a0, 8 - li.d $a0, 0 + xori $a0, $a1, 1 ret 1: li.d $a0, 1 |