... 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.
(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>"
;; 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.
/*
**test_s8_s64:
**...
-** ldapursb w0, \[x[0-9]+\]
+** ldapursb x0, \[x[0-9]+\]
** ret
*/
/*
**test_s16_s64:
**...
-** ldapursh w0, \[x[0-9]+\]
+** ldapursh x0, \[x[0-9]+\]
** ret
*/