]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aarch64: Fix LDAPURS assembly output
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Fri, 18 Nov 2022 14:29:36 +0000 (14:29 +0000)
committerKyrylo Tkachov <kyrylo.tkachov@arm.com>
Fri, 18 Nov 2022 14:29:36 +0000 (14:29 +0000)
... 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.

gcc/config/aarch64/atomics.md
gcc/config/aarch64/iterators.md
gcc/testsuite/gcc.target/aarch64/ldapr-sext.c

index b6eac4e31fbc1625ccad7d7a4a32035fc6cc4e0a..5407cf7be49949c18577bc0e637bb06ccba1d49d 100644 (file)
          (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>"
index a3e40758e7be3848906d40d43bc54d9530b98a5b..7c7fcbbc24b99b3ad8687097a432fea64af47226 100644 (file)
 ;; 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.
index 292c55d9e6a4bba46c096619838b6bcaa9b20448..f57c09d0580624d884fd538075b4e2028aeea733 100644 (file)
@@ -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
 */