From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1005) id 22DB63858D3C; Wed, 11 Jan 2023 06:43:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 22DB63858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673419432; bh=/AbLPYRL+fDSrHJG7pMQGqF/P15LJa1tGHpMWZ5TMo4=; h=From:To:Subject:Date:From; b=Oy1v0AQ++wlMjxM7+7EtLGxf6D+BdNz7sjXQMap4pd6LhM9XYu9tYLTcDEmaqKUt8 T1W5EGfsUKV5QOHOHVd/HiRI8yN83NkiB63+myBPrWApS5htaoyZd5Hh2TZILlEmXH oaDXqRAmn8mtE91DvfhlfOZThQCJtxzrxn3BCE9k= 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)] Patch libgcc to always use _Float128 and _Complex _Float128 on PowerPC. X-Act-Checkin: gcc X-Git-Author: Michael Meissner X-Git-Refname: refs/users/meissner/heads/work105y X-Git-Oldrev: fc852ac42030d065eaaa3c6abd2f0f9cda3cc305 X-Git-Newrev: 5e170ddca5d8efb865ebc1f58cc51dd1663aae7c Message-Id: <20230111064352.22DB63858D3C@sourceware.org> Date: Wed, 11 Jan 2023 06:43:52 +0000 (GMT) List-Id: https://gcc.gnu.org/g:5e170ddca5d8efb865ebc1f58cc51dd1663aae7c commit 5e170ddca5d8efb865ebc1f58cc51dd1663aae7c Author: Michael Meissner Date: Wed Jan 11 01:43:21 2023 -0500 Patch libgcc to always use _Float128 and _Complex _Float128 on PowerPC. 2023-01-11 Michael Meissner * config/rs6000/quad-float128.h (TF): Delete definition. (TFtype): Define to be _Float128. (TCtype): Change to be _Complex _Float128. * libgcc2.h (TFtype): Allow MD code to override definition. (TCtype): Likewise. * soft-fp/quad.h (TFtype): Likewise. Diff: --- libgcc/config/rs6000/quad-float128.h | 19 +++---------------- libgcc/libgcc2.h | 5 +++++ libgcc/soft-fp/quad.h | 2 ++ 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/libgcc/config/rs6000/quad-float128.h b/libgcc/config/rs6000/quad-float128.h index ae0622c744c..3fa70d0e0a8 100644 --- a/libgcc/config/rs6000/quad-float128.h +++ b/libgcc/config/rs6000/quad-float128.h @@ -27,22 +27,9 @@ License along with the GNU C Library; if not, see . */ -/* 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 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 -typedef __complex float TCtype __attribute__ ((mode (TC))); -#endif +/* Override quad.h's definitions for 128-bit floating point type. */ +#define TFtype _Float128 +#define TCtype _Complex _Float128 /* Force the use of the VSX instruction set. */ #if defined(_ARCH_PPC) && (!defined(__VSX__) || !defined(__FLOAT128__)) diff --git a/libgcc/libgcc2.h b/libgcc/libgcc2.h index fc24ac34502..a39c365d904 100644 --- a/libgcc/libgcc2.h +++ b/libgcc/libgcc2.h @@ -156,9 +156,14 @@ 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 3889bb44f1f..71f87d36ba9 100644 --- a/libgcc/soft-fp/quad.h +++ b/libgcc/soft-fp/quad.h @@ -65,7 +65,9 @@ #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