summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/gcc/gcc/config/mips/sync.S14
1 files changed, 7 insertions, 7 deletions
diff --git a/gnu/gcc/gcc/config/mips/sync.S b/gnu/gcc/gcc/config/mips/sync.S
index fca324cb41d..6e684139400 100644
--- a/gnu/gcc/gcc/config/mips/sync.S
+++ b/gnu/gcc/gcc/config/mips/sync.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: sync.S,v 1.1 2015/12/18 16:44:03 visa Exp $ */
+/* $OpenBSD: sync.S,v 1.2 2015/12/26 15:51:57 visa Exp $ */
/*
* Copyright (c) 2015 Visa Hankala
*
@@ -193,9 +193,9 @@ SYNC_OP_AND_FETCH_EMUL(nand, 1, and, NEG_v1, 3, 0xff)
#define SYNC_BOOL_COMPARE_AND_SWAP(n, ll, sc, trunc) \
LEAF(__sync_bool_compare_and_swap_##n); \
trunc; \
-1: move $v1, $a2; \
- ##ll $v0, ($a0); \
+1: ##ll $v0, ($a0); \
bne $v0, $a1, 2f; \
+ move $v1, $a2; \
##sc $v1, ($a0); \
beq $v1, $0, 1b; \
nop; \
@@ -220,7 +220,7 @@ LEAF(__sync_bool_compare_and_swap_##n); \
1: ll $v0, ($a0); \
and $v1, $v0, $t1; /* Get the old value. */ \
bne $v1, $a1, 2f; \
- and $v1, $v0, $t2; /* Clear the old value. */ \
+ and $v1, $v0, $t2; /* Clear the old value. */ \
or $v1, $v1, $a2; /* Insert the new value. */ \
sc $v1, ($a0); \
beq $v1, $0, 1b; \
@@ -241,9 +241,9 @@ SYNC_BOOL_COMPARE_AND_SWAP_EMUL(1, 3, 0xff)
#define SYNC_VAL_COMPARE_AND_SWAP(n, ll, sc, trunc) \
LEAF(__sync_val_compare_and_swap_##n); \
trunc; \
-1: move $v1, $a2; \
- ##ll $v0, ($a0); \
+1: ##ll $v0, ($a0); \
bne $v0, $a1, 2f; \
+ move $v1, $a2; \
##sc $v1, ($a0); \
beq $v1, $0, 1b; \
nop; \
@@ -266,7 +266,7 @@ LEAF(__sync_val_compare_and_swap_##n); \
1: ll $v0, ($a0); \
and $t3, $v0, $t1; /* Get the old value. */ \
bne $t3, $a1, 2f; \
- and $v1, $v0, $t2; /* Clear the old value. */ \
+ and $v1, $v0, $t2; /* Clear the old value. */ \
or $v1, $v1, $a2; /* Insert the new value. */ \
sc $v1, ($a0); \
beq $v1, $0, 1b; \