From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1005) id DE7A33858D28; Wed, 18 Jan 2023 15:57:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE7A33858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674057477; bh=eeYa8u0sKREShnPjU3Q7u43LGoXWRUftIsJpNSIunNc=; h=From:To:Subject:Date:From; b=H5oiI1xbeWeGUiwiMl8WSho7f0PFF6m+fphBvlvI2NfCCz6Zn2p008iJka9pNrIpD fkwETSlSBp4owHfnu3VyjtY8dxWRkmpzhmbOIFm5mEnG0z/ijd2Ht2mNFsrLQ6uHaw FNbvOzE+ybXeY1lF22ubPhWqH/hILwwZCM2nNpyE= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Michael Meissner To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/meissner/heads/work106)] Revert patches X-Act-Checkin: gcc X-Git-Author: Michael Meissner X-Git-Refname: refs/users/meissner/heads/work106 X-Git-Oldrev: c7cbc795a12bc3651096d12b4762af23b1a07a07 X-Git-Newrev: 68ed94d070d5b216376052662f57532afa088c1d Message-Id: <20230118155757.DE7A33858D28@sourceware.org> Date: Wed, 18 Jan 2023 15:57:57 +0000 (GMT) List-Id: https://gcc.gnu.org/g:68ed94d070d5b216376052662f57532afa088c1d commit 68ed94d070d5b216376052662f57532afa088c1d Author: Michael Meissner Date: Wed Jan 18 10:57:53 2023 -0500 Revert patches Diff: --- libgcc/config/rs6000/_divkc3.c | 21 ++++-------------- libgcc/config/rs6000/_mulkc3.c | 20 ++++------------- libgcc/config/rs6000/float128-ifunc.c | 6 ++--- libgcc/config/rs6000/quad-float128.h | 42 +++++++++++------------------------ 4 files changed, 23 insertions(+), 66 deletions(-) diff --git a/libgcc/config/rs6000/_divkc3.c b/libgcc/config/rs6000/_divkc3.c index b1c9c9f6e3a..59ab2137d1d 100644 --- a/libgcc/config/rs6000/_divkc3.c +++ b/libgcc/config/rs6000/_divkc3.c @@ -26,19 +26,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "soft-fp.h" #include "quad-float128.h" -/* Use the correct built-ins depending on whether long double is IEEE 128-bit - or IBM 128-bit. */ -#ifndef __LONG_DOUBLE_IEEE128__ #define COPYSIGN(x,y) __builtin_copysignf128 (x, y) #define INFINITY __builtin_inff128 () #define FABS __builtin_fabsf128 - -#else -#define COPYSIGN(x,y) __builtin_copysignl (x, y) -#define INFINITY __builtin_infl () -#define FABS __builtin_fabsl -#endif - #define isnan __builtin_isnan #define isinf __builtin_isinf #define isfinite __builtin_isfinite @@ -61,14 +51,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define RMAX2 (RBIG * RMIN2) #endif -TCtype_cmuldiv -__divkc3 (TFtype_cmuldiv a, - TFtype_cmuldiv b, - TFtype_cmuldiv c, - TFtype_cmuldiv d) +TCtype +__divkc3 (TFtype a, TFtype b, TFtype c, TFtype d) { - TFtype_cmuldiv denom, ratio, x, y; - TCtype_cmuldiv res; + TFtype denom, ratio, x, y; + TCtype res; /* long double has significant potential underflow/overflow errors that can be greatly reduced with a limited number of tests and adjustments. diff --git a/libgcc/config/rs6000/_mulkc3.c b/libgcc/config/rs6000/_mulkc3.c index 05d2913439a..cfae81f8b5f 100644 --- a/libgcc/config/rs6000/_mulkc3.c +++ b/libgcc/config/rs6000/_mulkc3.c @@ -26,17 +26,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "soft-fp.h" #include "quad-float128.h" -/* Use the correct built-ins depending on whether long double is IEEE 128-bit - or IBM 128-bit. */ -#ifndef __LONG_DOUBLE_IEEE128__ #define COPYSIGN(x,y) __builtin_copysignf128 (x, y) #define INFINITY __builtin_inff128 () - -#else -#define COPYSIGN(x,y) __builtin_copysignl (x, y) -#define INFINITY __builtin_infl () -#endif - #define isnan __builtin_isnan #define isinf __builtin_isinf @@ -44,14 +35,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define __mulkc3 __mulkc3_sw #endif -TCtype_cmuldiv -__mulkc3 (TFtype_cmuldiv a, - TFtype_cmuldiv b, - TFtype_cmuldiv c, - TFtype_cmuldiv d) +TCtype +__mulkc3 (TFtype a, TFtype b, TFtype c, TFtype d) { - TFtype_cmuldiv ac, bd, ad, bc, x, y; - TCtype_cmuldiv res; + TFtype ac, bd, ad, bc, x, y; + TCtype res; ac = a * c; bd = b * d; diff --git a/libgcc/config/rs6000/float128-ifunc.c b/libgcc/config/rs6000/float128-ifunc.c index 6ea8fdd82c3..73cbca2fc9a 100644 --- a/libgcc/config/rs6000/float128-ifunc.c +++ b/libgcc/config/rs6000/float128-ifunc.c @@ -354,10 +354,8 @@ IBM128_TYPE __extendkftf2 (TFtype) TFtype __trunctfkf2 (IBM128_TYPE) __attribute__ ((__ifunc__ ("__trunctfkf2_resolve"))); -TCtype_cmuldiv __mulkc3 (TFtype_cmuldiv, TFtype_cmuldiv, - TFtype_cmuldiv, TFtype_cmuldiv) +TCtype __mulkc3 (TFtype, TFtype, TFtype, TFtype) __attribute__ ((__ifunc__ ("__mulkc3_resolve"))); -TCtype_cmuldiv __divkc3 (TFtype_cmuldiv, TFtype_cmuldiv, - TFtype_cmuldiv, TFtype_cmuldiv) +TCtype __divkc3 (TFtype, TFtype, TFtype, TFtype) __attribute__ ((__ifunc__ ("__divkc3_resolve"))); diff --git a/libgcc/config/rs6000/quad-float128.h b/libgcc/config/rs6000/quad-float128.h index 6cfbee6e599..ae0622c744c 100644 --- a/libgcc/config/rs6000/quad-float128.h +++ b/libgcc/config/rs6000/quad-float128.h @@ -30,28 +30,18 @@ /* quad.h defines the TFtype type by: typedef float TFtype __attribute__ ((mode (TF))); - These two defines override the machine independent files that use - __attribute__((mode(TF))) and __attribute__((mode(TC))) to create the IEEE - 128-bit scalar and complex types. */ + This define forces it to use KFmode (aka, ieee 128-bit floating point). + However, when the compiler's default is changed so that long double is IEEE + 128-bit floating point, we need to go back to using TFmode and TCmode. */ #ifndef __LONG_DOUBLE_IEEE128__ #define TF KF -#define TC KC -#endif -/* Special types for IEEE 128-bit floating point complex multiply/divide - support. We need to use _Float128 or long double specifically so that the - compiler doesn't complain about different types when we do the declaration. - __mulkc3 and __divkc3 are built-in functions with pre-defined types. Using - __attribute__ mode creates a different type internally, and the compiler - complains when you issue the declaration when the original type used - _Float128 or long double. */ -#ifdef __LONG_DOUBLE_IEEE128__ -#define TFtype_cmuldiv long double -#define TCtype_cmuldiv _Complex long double +/* We also need TCtype to represent complex ieee 128-bit float for + __mulkc3 and __divkc3. */ +typedef __complex float TCtype __attribute__ ((mode (KC))); #else -#define TFtype_cmuldiv _Float128 -#define TCtype_cmuldiv _Complex _Float128 +typedef __complex float TCtype __attribute__ ((mode (TC))); #endif /* Force the use of the VSX instruction set. */ @@ -110,10 +100,8 @@ extern UTItype_ppc __fixunskfti_sw (TFtype); #endif extern IBM128_TYPE __extendkftf2_sw (TFtype); extern TFtype __trunctfkf2_sw (IBM128_TYPE); -extern TCtype_cmuldiv __mulkc3_sw (TFtype_cmuldiv, TFtype_cmuldiv, - TFtype_cmuldiv, TFtype_cmuldiv); -extern TCtype_cmuldiv __divkc3_sw (TFtype_cmuldiv, TFtype_cmuldiv, - TFtype_cmuldiv, TFtype_cmuldiv); +extern TCtype __mulkc3_sw (TFtype, TFtype, TFtype, TFtype); +extern TCtype __divkc3_sw (TFtype, TFtype, TFtype, TFtype); #ifdef _ARCH_PPC64 extern TItype_ppc __fixkfti (TFtype); @@ -158,10 +146,8 @@ extern UTItype_ppc __fixunskfti_hw (TFtype); #endif extern IBM128_TYPE __extendkftf2_hw (TFtype); extern TFtype __trunctfkf2_hw (IBM128_TYPE); -extern TCtype_cmuldiv __mulkc3_hw (TFtype_cmuldiv, TFtype_cmuldiv, - TFtype_cmuldiv, TFtype_cmuldiv); -extern TCtype_cmuldiv __divkc3_hw (TFtype_cmuldiv, TFtype_cmuldiv, - TFtype_cmuldiv, TFtype_cmuldiv); +extern TCtype __mulkc3_hw (TFtype, TFtype, TFtype, TFtype); +extern TCtype __divkc3_hw (TFtype, TFtype, TFtype, TFtype); /* Ifunc function declarations, to automatically switch between software emulation and hardware support. */ @@ -202,10 +188,8 @@ extern IBM128_TYPE __extendkftf2 (TFtype); extern TFtype __trunctfkf2 (IBM128_TYPE); /* Complex __float128 built on __float128 interfaces. */ -extern TCtype_cmuldiv __mulkc3 (TFtype_cmuldiv, TFtype_cmuldiv, - TFtype_cmuldiv, TFtype_cmuldiv); -extern TCtype_cmuldiv __divkc3 (TFtype_cmuldiv, TFtype_cmuldiv, - TFtype_cmuldiv, TFtype_cmuldiv); +extern TCtype __mulkc3 (TFtype, TFtype, TFtype, TFtype); +extern TCtype __divkc3 (TFtype, TFtype, TFtype, TFtype); /* Convert IEEE 128-bit floating point to/from string. We explicitly use _Float128 instead of TFmode because _strtokf and _strfromkf must be compiled