]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Fix up __aarch64_cas16_acq_rel fallback
authorJakub Jelinek <jakub@redhat.com>
Mon, 3 Aug 2020 20:55:28 +0000 (22:55 +0200)
committerTamar Christina <tamar.christina@arm.com>
Fri, 7 Aug 2020 12:26:27 +0000 (13:26 +0100)
commit4e91af9877df9e6b28ea8e50ae9445590363d5b0
tree90cf1d1a99d3aa3b7ad1e7582d6ae1f651997d7d
parent3e40be9cc92d3fa117be7f4fab07cedeed8361a2
aarch64: Fix up __aarch64_cas16_acq_rel fallback

As mentioned in the PR, the fallback path when LSE is unavailable writes
incorrect registers to the memory if the previous content compares equal
to x0, x1 - it writes copy of x0, x1 from the start of function, but it
should write x2, x3.

2020-08-03  Jakub Jelinek  <jakub@redhat.com>

PR target/96402
* config/aarch64/lse.S (__aarch64_cas16_acq_rel): Use x2, x3 instead
of x(tmp0), x(tmp1) in STXP arguments.

* gcc.target/aarch64/pr96402.c: New test.

(cherry picked from commit 90b43856fdff7d96d93d22970eca8a86c56e0ddc)
gcc/testsuite/gcc.target/aarch64/pr96402.c [new file with mode: 0644]
libgcc/config/aarch64/lse.S