From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1005) id 6470F3858D28; Wed, 18 Jan 2023 08:57:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6470F3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674032232; bh=AUhOxiLMkyA8JndNTGHBSWptjVqK/WAaZI5PijVuW4M=; h=From:To:Subject:Date:From; b=wpAcTTod292eHYDYIerqzPrE8E8A/lqSJgdk8xuofgqM9oLmkp6FmsG1TOvh0ScmI slJF6kDuo8JXUTt5WStxqSgp4i5HXAYUYuZ/XOtp27M8S94AWR6lQoqNx5PKLvt1AI DIffafLyOLEa1jGS7r0R9AAhiD4e3tQBhj7uTk3Y= 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)] Update ChangeLog.meissner X-Act-Checkin: gcc X-Git-Author: Michael Meissner X-Git-Refname: refs/users/meissner/heads/work106 X-Git-Oldrev: 09ea1b9d4c330252841cd8f8b420b0e8ba03a2d9 X-Git-Newrev: c7cbc795a12bc3651096d12b4762af23b1a07a07 Message-Id: <20230118085712.6470F3858D28@sourceware.org> Date: Wed, 18 Jan 2023 08:57:12 +0000 (GMT) List-Id: https://gcc.gnu.org/g:c7cbc795a12bc3651096d12b4762af23b1a07a07 commit c7cbc795a12bc3651096d12b4762af23b1a07a07 Author: Michael Meissner Date: Wed Jan 18 03:57:09 2023 -0500 Update ChangeLog.meissner Diff: --- gcc/ChangeLog.meissner | 77 ++++++++++++++++++++++---------------------------- 1 file changed, 33 insertions(+), 44 deletions(-) diff --git a/gcc/ChangeLog.meissner b/gcc/ChangeLog.meissner index 20e6f8343c1..31893ab4dc9 100644 --- a/gcc/ChangeLog.meissner +++ b/gcc/ChangeLog.meissner @@ -1,22 +1,26 @@ -==================== work106, patch #4 ==================== +==================== work106, patch #6 ==================== -PR target/107299: Update IEEE 128-bit types in PowerPC libgcc. +PR target/107299: Fix build issue when long double is IEEE 128-bit -This patch updates the IEEE 128-bit types in libgcc. +This patch updates the IEEE 128-bit types used in libgcc. At the moment, we cannot build GCC when the target uses IEEE 128-bit long doubles, such as building the compiler for a native Fedora 36 system. The build dies when it is trying to build the _mulkc3.c and _divkc3 modules. -This patch changes the IEEE 128-bit type (TFtype) in the IEEE 128-bit support -to use either _Float128 or long double. Previously we would use the __float128 -type. In addition, the TCtype will use the same type along with _Complex. +This patch creates special types for declaring complex IEEE 128-bit multiply and +divide support to use either _Float128 or long double, depending on whether long +double is IBM or IEEE. + +It also uses the correct built-in functions in the libgcc complex IEEE 128-bit +multiply and divide support. This fixes the problems when long double types are +used with explicit f128 built-in functions. While it is desirable to ultimately have __float128 and _Float128 use the same internal type and mode within GCC, at present if you use the option --mabi=ieeelongdouble, the __float128 type will use the long double type. We -get an internal compiler error if we combine the signbitf128 built-in with a -long double type. +-mabi=ieeelongdouble, the __float128 type will use the long double type and not +the _Float128 type. We get an internal compiler error if we combine the +signbitf128 built-in with a long double type. I've gone through several iterations of trying to fix this within GCC, and there are various problems that have come up. I developed this alternative @@ -33,49 +37,34 @@ errors from the compiler. 2023-01-18 Michael Meissner PR target/107299 - * config/rs6000/_divkc3.c (top level): Require that long double is IEEE - 128-bit. - (COPYSIGN): Use long double built-in. + * config/rs6000/_divkc3.c (COPYSIGN): Use the correct built-in based on + whether long double is IBM or IEEE. (INFINITY): Likewise. (FABS): Likewise. - (RBIG): Use TFmode constants, not KFmode. - (RMIN): Likewise. - (RMIN2): Likewise. - (RMINSCAL): Likewise. - (RMAX2): Likewise. - * config/rs6000/_mulkc3.c (top level): Require that long double is IEEE - 128-bit. - (COPYSIGN): Use long double built-in. + (__divkc3): Use either _Float128 or long double for the types to match + whether long double is IBM or IEEE. + * config/rs6000/_mulkc3.c (COPYSIGN): Use the correct built-in based on + whether long double is IBM or IEEE. (INFINITY): Likewise. - * config/rs6000/quad-float128.h (TF): Remove definition. - (TFtype): New macro, use _Float128 or long double. - (TCtype): Change to macro, use _Complex _Float128 or _Complex long - double. - (__mulkc3_sw): Only declare if long double is IEEE 128-bit. + (__mulkc3): Use either _Float128 or long double for the types to match + whether long double is IBM or IEEE. + * config/rs6000/float128-ifunc.c (__mulkc3): Use either _Float128 or + long double for the types to match whether long double is IBM or IEEE. + (__divkc3): Likewise. + * config/rs6000/quad-float128.h (TC): Define to switch complex IEEE + 128-bit type in machine independent code via mode attribute. + (TFtype_cmuldiv): New macro. + (TCtype_cmuldiv): Likewise. + (__mulkc3_sw): Use TFtype_cmuldiv and TCtype_cmuldiv. (__divkc3_sw): Likewise. (__mulkc3_hw): Likewise. (__divkc3_hw): Likewise. (__mulkc3): Likewise. (__divkc3): Likewise. - * config/rs6000/t-rs6000 (fp128_cmuldiv): Add support to build IEEE - 128-bit complex multiply/divide with explicit IEEE-128 long double. - (fp128_cmuldiv_static_obj): Likewise. - (fp128_cmuldiv_shared_obj): Likewise. - (fp128_cmuldiv_obj): Likewise. - (fp128_ppc_funcs): Likewise. - (FP128_CFLAGS_CMULDIV): Likewise. - * config/rs6000/t-rs6000-hw (fp128_hardfp_src): Delete, unused. - (fp128_cmuldiv_funcs): Add support to build IEEE 128-bit complex - multiply/divide with explicit IEEE-128 long double. - (fp128_cmuldiv_static_obj): Likewise. - (fp128_cmuldiv_shared_obj): Likewise. - (fp128_cmuldiv_obj): Likewise. - (fp128_hw_funcs): Likewise. - (fp128_ifunc_funcs): Delete, unused. - (fp128_ifunc_src): Likewise. - * libgcc2.h (TFtype): Allow md files to override this. - (TCtype): Likewise. - * soft-fp/quad.h (TFtype): Likewise. + +==================== work106, patch #5 was reverted ==================== + +==================== work106, patch #4 was reverted ==================== ==================== work106, patch #3 was reverted ====================