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