From: Kyrylo Tkachov Date: Wed, 1 Apr 2020 11:11:58 +0000 (+0100) Subject: aarch64: Fix store-exclusive in load-operate LSE helpers X-Git-Tag: embedded-9-2020q2~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb9156ede009cfb572ab98c64288de5b21a89c17;p=thirdparty%2Fgcc.git aarch64: Fix store-exclusive in load-operate LSE helpers 2020-04-01 Kyrylo Tkachov Backport from mainline 2019-09-25 Richard Henderson PR target/91834 * config/aarch64/lse.S (LDNM): Ensure STXR output does not overlap the inputs. --- diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 67e5eabf8515..6f92b203b6e4 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,12 @@ +2020-04-01 Kyrylo Tkachov + + Backport from mainline + 2019-09-25 Richard Henderson + + PR target/91834 + * config/aarch64/lse.S (LDNM): Ensure STXR output does not + overlap the inputs. + 2020-04-01 Kyrylo Tkachov Backport from mainline diff --git a/libgcc/config/aarch64/lse.S b/libgcc/config/aarch64/lse.S index a5f6673596c7..c7979382ad77 100644 --- a/libgcc/config/aarch64/lse.S +++ b/libgcc/config/aarch64/lse.S @@ -227,8 +227,8 @@ STARTFN NAME(LDNM) 8: mov s(tmp0), s(0) 0: LDXR s(0), [x1] OP s(tmp1), s(0), s(tmp0) - STXR w(tmp1), s(tmp1), [x1] - cbnz w(tmp1), 0b + STXR w(tmp2), s(tmp1), [x1] + cbnz w(tmp2), 0b ret ENDFN NAME(LDNM)