public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Kyrylo Tkachov <ktkachov@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-4141] aarch64: Fix LDAPURS assembly output
Date: Fri, 18 Nov 2022 14:57:38 +0000 (GMT)	[thread overview]
Message-ID: <20221118145738.A55523858410@sourceware.org> (raw)

https://gcc.gnu.org/g:92905f614e206a94d4ba72a4d425f78859ead418

commit r13-4141-g92905f614e206a94d4ba72a4d425f78859ead418
Author: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Date:   Fri Nov 18 14:29:36 2022 +0000

    aarch64: Fix LDAPURS assembly output
    
    ... And another follow-up once I realised that the sign-extending load, of course,
    needs to have strictly an X-reg as a destination for DImode extensions and a W-reg
    for SImode ones.
    
    Tested on aarch64-none-linux.
    
    gcc/ChangeLog:
    
            * config/aarch64/atomics.md (*aarch64_atomic_load<ALLX:mode>_rcpc_sext):
            Use <GPI:w>  for destination format.
            * config/aarch64/iterators.md (w_sz): Delete.
    
    gcc/testsuite/ChangeLog:
    
            * gcc.target/aarch64/ldapr-sext.c: Adjust expected output.

Diff:
---
 gcc/config/aarch64/atomics.md                 | 2 +-
 gcc/config/aarch64/iterators.md               | 4 ----
 gcc/testsuite/gcc.target/aarch64/ldapr-sext.c | 4 ++--
 3 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/gcc/config/aarch64/atomics.md b/gcc/config/aarch64/atomics.md
index b6eac4e31fb..5407cf7be49 100644
--- a/gcc/config/aarch64/atomics.md
+++ b/gcc/config/aarch64/atomics.md
@@ -723,7 +723,7 @@
          (match_operand:SI 2 "const_int_operand")]			;; model
        UNSPECV_LDAP)))]
   "TARGET_RCPC2 && (<GPI:sizen> > <ALLX:sizen>)"
-  "ldapurs<ALLX:size>\t%<ALLX:w_sx>0, %1"
+  "ldapurs<ALLX:size>\t%<GPI:w>0, %1"
 )
 
 (define_insn "atomic_store<mode>"
diff --git a/gcc/config/aarch64/iterators.md b/gcc/config/aarch64/iterators.md
index a3e40758e7b..7c7fcbbc24b 100644
--- a/gcc/config/aarch64/iterators.md
+++ b/gcc/config/aarch64/iterators.md
@@ -1012,10 +1012,6 @@
 ;; 32-bit version and "%x0" in the 64-bit version.
 (define_mode_attr w [(QI "w") (HI "w") (SI "w") (DI "x") (SF "s") (DF "d")])
 
-;; Similar to w above, but used for sign-extending loads where we want to
-;; use %x0 for SImode.
-(define_mode_attr w_sx [(QI "w") (HI "w") (SI "x")])
-
 ;; The size of access, in bytes.
 (define_mode_attr ldst_sz [(SI "4") (DI "8")])
 ;; Likewise for load/store pair.
diff --git a/gcc/testsuite/gcc.target/aarch64/ldapr-sext.c b/gcc/testsuite/gcc.target/aarch64/ldapr-sext.c
index 292c55d9e6a..f57c09d0580 100644
--- a/gcc/testsuite/gcc.target/aarch64/ldapr-sext.c
+++ b/gcc/testsuite/gcc.target/aarch64/ldapr-sext.c
@@ -24,7 +24,7 @@ test_##name (void)						\
 /*
 **test_s8_s64:
 **...
-**	ldapursb	w0, \[x[0-9]+\]
+**	ldapursb	x0, \[x[0-9]+\]
 **	ret
 */
 
@@ -33,7 +33,7 @@ TEST(s8_s64, s8, long long)
 /*
 **test_s16_s64:
 **...
-**	ldapursh	w0, \[x[0-9]+\]
+**	ldapursh	x0, \[x[0-9]+\]
 **	ret
 */

                 reply	other threads:[~2022-11-18 14:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221118145738.A55523858410@sourceware.org \
    --to=ktkachov@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).