public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] rs6000: Guard bifs {un,}pack_{longdouble,ibm128} under hard float [PR103623]
@ 2022-03-03  2:11 Kewen.Lin
  2022-03-15 11:36 ` PING^1 [PATCH] rs6000: Guard bifs {un, }pack_{longdouble, ibm128} " Kewen.Lin
  2022-04-07 11:09 ` Segher Boessenkool
  0 siblings, 2 replies; 12+ messages in thread
From: Kewen.Lin @ 2022-03-03  2:11 UTC (permalink / raw)
  To: GCC Patches
  Cc: Segher Boessenkool, David Edelsohn, Bill Schmidt, Peter Bergner

[-- Attachment #1: Type: text/plain, Size: 1346 bytes --]

Hi,

As PR103623 shows, it's a regression failure due to new built-in
function framework, previously we guard __builtin_{un,}pack_{longdouble,
ibm128} built-in functions under hard float, so they are unavailable
with the given configuration.  While with new bif infrastructure, it
becomes available and gets ICE due to incomplete supports.

Segher and Peter pointed out that we should make them available with
soft float, I agree we can extend them to cover both soft and hard
float.  But considering it's stage 4 now and this regression is
classified as P1, also the previous behavior requiring hard float
aligns with what document [1] says, I guess it may be a good idea to
fix it with the attached small patch to be consistent with the previous
behavior.  Then we can extend the functionality in upcoming stage 1.

Bootstrapped and regtested on powerpc64-linux-gnu P8 and
powerpc64le-linux-gnu P9 and P10.

Any thoughts?

[1] https://gcc.gnu.org/onlinedocs/gcc/Basic-PowerPC-Built-in-Functions-Available-on-ISA-2_002e05.html#Basic-PowerPC-Built-in-Functions-Available-on-ISA-2_002e05

BR,
Kewen
------
	PR target/103623

gcc/ChangeLog:

	* config/rs6000/rs6000-builtins.def (__builtin_pack_longdouble): Add
	nosoft attribute.
	(__builtin_unpack_longdouble): Likewise.
	(__builtin_pack_ibm128): Likewise.
	(__builtin_unpack_ibm128): Likewise.


[-- Attachment #2: pr103623.patch --]
[-- Type: text/plain, Size: 1414 bytes --]

---
 gcc/config/rs6000/rs6000-builtins.def | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-builtins.def b/gcc/config/rs6000/rs6000-builtins.def
index ae2760c3338..b78ec525d5f 100644
--- a/gcc/config/rs6000/rs6000-builtins.def
+++ b/gcc/config/rs6000/rs6000-builtins.def
@@ -219,7 +219,7 @@
 ; This is redundant with __builtin_pack_ibm128, as it requires long
 ; double to be __ibm128.  Should probably be deprecated.
   const long double __builtin_pack_longdouble (double, double);
-    PACK_TF packtf {ibmld}
+    PACK_TF packtf {ibmld,nosoft}
 
   unsigned long __builtin_ppc_mftb ();
     MFTB rs6000_mftb_di {32bit}
@@ -234,18 +234,18 @@
     MTFSF rs6000_mtfsf {}
 
   const __ibm128 __builtin_pack_ibm128 (double, double);
-    PACK_IF packif {}
+    PACK_IF packif {nosoft}
 
   void __builtin_set_fpscr_rn (const int[0,3]);
     SET_FPSCR_RN rs6000_set_fpscr_rn {}
 
   const double __builtin_unpack_ibm128 (__ibm128, const int<1>);
-    UNPACK_IF unpackif {}
+    UNPACK_IF unpackif {nosoft}
 
 ; This is redundant with __builtin_unpack_ibm128, as it requires long
 ; double to be __ibm128.  Should probably be deprecated.
   const double __builtin_unpack_longdouble (long double, const int<1>);
-    UNPACK_TF unpacktf {ibmld}
+    UNPACK_TF unpacktf {ibmld,nosoft}
 
 
 ; Builtins that have been around just about forever, but not quite.
-- 
2.27.0


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

end of thread, other threads:[~2022-04-13  1:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-03  2:11 [PATCH] rs6000: Guard bifs {un,}pack_{longdouble,ibm128} under hard float [PR103623] Kewen.Lin
2022-03-15 11:36 ` PING^1 [PATCH] rs6000: Guard bifs {un, }pack_{longdouble, ibm128} " Kewen.Lin
2022-04-07 11:09 ` Segher Boessenkool
2022-04-07 13:00   ` Jakub Jelinek
2022-04-08  2:09     ` Kewen.Lin
2022-04-08 17:31       ` Segher Boessenkool
2022-04-11  8:29         ` Kewen.Lin
2022-04-11 15:42           ` Segher Boessenkool
2022-04-12  2:02             ` Kewen.Lin
2022-04-12 19:11               ` Segher Boessenkool
2022-04-13  1:05                 ` Kewen.Lin
2022-04-08 16:56     ` Segher Boessenkool

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