public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] rs6000: __builtin_darn[_raw] should be in [power9-64] (PR103624)
@ 2021-12-13 15:48 Bill Schmidt
  2021-12-13 16:30 ` David Edelsohn
  0 siblings, 1 reply; 11+ messages in thread
From: Bill Schmidt @ 2021-12-13 15:48 UTC (permalink / raw)
  To: GCC Patches; +Cc: Segher Boessenkool, David Edelsohn

Hi!

PR103624 observes that we get segfaults for the 64-bit darn builtins when compiled
on a 32-bit architecture.  The old built-in infrastructure requires TARGET_64BIT, and
this was missed in the new support.  Moving these two builtins from the [power9]
stanza to the [power9-64] stanza solves the problem.

Tested the fix on a powerpc-e300c3-linux-gnu cross.  Bootstrapped and tested on
powerpc64le-linux-gnu with no regressions.  Is this okay for trunk?

Thanks!
Bill


2021-12-13  Bill Schmidt  <wschmidt@linux.ibm.com>

gcc/
	PR target/103624
	* config/rs6000/rs6000-builtin-new.def (__builtin_darn): Move to
	[power9-64] stanza.
	(__builtin_darn_raw): Likewise.
---
 gcc/config/rs6000/rs6000-builtin-new.def | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-builtin-new.def b/gcc/config/rs6000/rs6000-builtin-new.def
index 30556e5c7f2..2becd96a36c 100644
--- a/gcc/config/rs6000/rs6000-builtin-new.def
+++ b/gcc/config/rs6000/rs6000-builtin-new.def
@@ -2799,15 +2799,9 @@
 
 ; Miscellaneous P9 functions
 [power9]
-  signed long long __builtin_darn ();
-    DARN darn {}
-
   signed int __builtin_darn_32 ();
     DARN_32 darn_32 {}
 
-  signed long long __builtin_darn_raw ();
-    DARN_RAW darn_raw {}
-
   const signed int __builtin_dtstsfi_eq_dd (const int<6>, _Decimal64);
     TSTSFI_EQ_DD dfptstsfi_eq_dd {}
 
@@ -2840,6 +2834,12 @@
   void __builtin_altivec_stxvl (vsc, void *, long);
     STXVL stxvl {}
 
+  signed long long __builtin_darn ();
+    DARN darn {}
+
+  signed long long __builtin_darn_raw ();
+    DARN_RAW darn_raw {}
+
   const signed int __builtin_scalar_byte_in_set (signed int, signed long long);
     CMPEQB cmpeqb {}
 
-- 
2.27.0



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-12-15 20:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13 15:48 [PATCH] rs6000: __builtin_darn[_raw] should be in [power9-64] (PR103624) Bill Schmidt
2021-12-13 16:30 ` David Edelsohn
2021-12-13 16:54   ` Segher Boessenkool
2021-12-13 20:37     ` Bill Schmidt
2021-12-14  0:22       ` Segher Boessenkool
2021-12-14 13:32         ` Bill Schmidt
2021-12-14 15:17           ` Bill Schmidt
2021-12-15  2:23           ` Segher Boessenkool
2021-12-15 14:00             ` Bill Schmidt
2021-12-15 18:41               ` Segher Boessenkool
2021-12-15 20:13                 ` Bill Schmidt

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).