From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1005) id 695893858C66; Thu, 12 Jan 2023 17:50:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 695893858C66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673545800; bh=etHUWeItR2qs5pGGgaE+PvbsJnr4JiAILrSyP0hQHnk=; h=From:To:Subject:Date:From; b=INuQtUXk5KImnBDG86dxR6yd+PX2eLFIWtfd7MlAjelY0OyYxMzxVvvxFLvtY5DrF bjcEQBqYkxtcY1QGUWvzCfGYRdJBYKTveGIl3OYICbCgnB9NtG2HtXJ045G86CH9UO IhVbFGfrk3di9VbseJPOp+htsDPJ6w/9fDJZRkps= 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/work105y)] Revert patches X-Act-Checkin: gcc X-Git-Author: Michael Meissner X-Git-Refname: refs/users/meissner/heads/work105y X-Git-Oldrev: eb5c87a12b54a10939723e03284e86b543ce31bf X-Git-Newrev: 6e3a98e57725307d59f318b62ed927e21c51d8c0 Message-Id: <20230112175000.695893858C66@sourceware.org> Date: Thu, 12 Jan 2023 17:50:00 +0000 (GMT) List-Id: https://gcc.gnu.org/g:6e3a98e57725307d59f318b62ed927e21c51d8c0 commit 6e3a98e57725307d59f318b62ed927e21c51d8c0 Author: Michael Meissner Date: Thu Jan 12 12:49:56 2023 -0500 Revert patches Diff: --- libgcc/config/rs6000/_divkc3.c | 10 +--------- libgcc/config/rs6000/_mulkc3.c | 7 ------- libgcc/config/rs6000/quad-float128.h | 21 ++++++++++++++++----- libgcc/libgcc2.h | 5 ----- libgcc/soft-fp/quad.h | 2 -- 5 files changed, 17 insertions(+), 28 deletions(-) diff --git a/libgcc/config/rs6000/_divkc3.c b/libgcc/config/rs6000/_divkc3.c index cc2b3d64b86..59ab2137d1d 100644 --- a/libgcc/config/rs6000/_divkc3.c +++ b/libgcc/config/rs6000/_divkc3.c @@ -26,17 +26,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "soft-fp.h" #include "quad-float128.h" -#ifndef __LONG_DOUBLE_IEEE128__ #define COPYSIGN(x,y) __builtin_copysignf128 (x, y) #define INFINITY __builtin_inff128 () -#define FABS(x) __builtin_fabsf128 (x) - -#else -#define COPYSIGN(x,y) __builtin_copysignl (x, y) -#define INFINITY __builtin_infl () -#define FABS(x) __builtin_fabsl (x) -#endif - +#define FABS __builtin_fabsf128 #define isnan __builtin_isnan #define isinf __builtin_isinf #define isfinite __builtin_isfinite diff --git a/libgcc/config/rs6000/_mulkc3.c b/libgcc/config/rs6000/_mulkc3.c index 290dc89bbc1..cfae81f8b5f 100644 --- a/libgcc/config/rs6000/_mulkc3.c +++ b/libgcc/config/rs6000/_mulkc3.c @@ -26,15 +26,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "soft-fp.h" #include "quad-float128.h" -#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 diff --git a/libgcc/config/rs6000/quad-float128.h b/libgcc/config/rs6000/quad-float128.h index f58aeab2ac3..ae0622c744c 100644 --- a/libgcc/config/rs6000/quad-float128.h +++ b/libgcc/config/rs6000/quad-float128.h @@ -27,14 +27,21 @@ License along with the GNU C Library; if not, see . */ -/* Override quad.h's definitions for 128-bit floating point type. */ +/* quad.h defines the TFtype type by: + typedef float TFtype __attribute__ ((mode (TF))); + + 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 TFtype _Float128 -#define TCtype _Complex _Float128 +#define TF KF + +/* 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 long double -#define TCtype _Complex long double +typedef __complex float TCtype __attribute__ ((mode (TC))); #endif /* Force the use of the VSX instruction set. */ @@ -180,6 +187,10 @@ extern UTItype_ppc __fixunskfti (TFtype); extern IBM128_TYPE __extendkftf2 (TFtype); extern TFtype __trunctfkf2 (IBM128_TYPE); +/* Complex __float128 built on __float128 interfaces. */ +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 with long double being IBM 128. */ diff --git a/libgcc/libgcc2.h b/libgcc/libgcc2.h index a39c365d904..fc24ac34502 100644 --- a/libgcc/libgcc2.h +++ b/libgcc/libgcc2.h @@ -156,14 +156,9 @@ typedef float XFtype __attribute__ ((mode (XF))); typedef _Complex float XCtype __attribute__ ((mode (XC))); #endif #if LIBGCC2_HAS_TF_MODE -/* PowerPC would like to override this to be _Float128. */ -#ifndef TFtype typedef float TFtype __attribute__ ((mode (TF))); -#endif -#ifndef TCtype typedef _Complex float TCtype __attribute__ ((mode (TC))); #endif -#endif typedef int cmp_return_type __attribute__((mode (__libgcc_cmp_return__))); typedef int shift_count_type __attribute__((mode (__libgcc_shift_count__))); diff --git a/libgcc/soft-fp/quad.h b/libgcc/soft-fp/quad.h index 71f87d36ba9..3889bb44f1f 100644 --- a/libgcc/soft-fp/quad.h +++ b/libgcc/soft-fp/quad.h @@ -65,9 +65,7 @@ #define _FP_HIGHBIT_DW_Q \ ((_FP_W_TYPE) 1 << (_FP_WFRACBITS_DW_Q - 1) % _FP_W_TYPE_SIZE) -#ifndef TFtype typedef float TFtype __attribute__ ((mode (TF))); -#endif #if _FP_W_TYPE_SIZE < 64