diff options
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/config/aarch64/lse.S | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libgcc/config/aarch64/lse.S b/libgcc/config/aarch64/lse.S index f64a3e9..046dd40 100644 --- a/libgcc/config/aarch64/lse.S +++ b/libgcc/config/aarch64/lse.S @@ -163,6 +163,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define tmp0 16 #define tmp1 17 #define tmp2 15 +#define tmp3 14 +#define tmp4 13 /* Start and end a function. */ .macro STARTFN name @@ -233,10 +235,11 @@ STARTFN NAME(cas) 0: LDXP x0, x1, [x4] cmp x0, x(tmp0) ccmp x1, x(tmp1), #0, eq - bne 1f - STXP w(tmp2), x2, x3, [x4] - cbnz w(tmp2), 0b -1: BARRIER + csel x(tmp2), x2, x0, eq + csel x(tmp3), x3, x1, eq + STXP w(tmp4), x(tmp2), x(tmp3), [x4] + cbnz w(tmp4), 0b + BARRIER ret #endif |