From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1005) id 9E86F3858C00; Fri, 27 Jan 2023 16:53:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E86F3858C00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674838439; bh=3cKyvXYfP/FNKAxb1SSgHHQq41YCUZnUzwGL9m+SSww=; h=From:To:Subject:Date:From; b=u1OV0HG5GaokPwKARvbKldN+DC9o4e3mI0sjRjFl7BvBvILYHEYOJfeDanhi54Ej7 RxYl2DYTusqSQ3SIeDLaBW8iHxM3pjj9fRTgYw/towpVMIny8S5OYCdvaE5lBaTQ5G lGkpjcijiwIaiSJuh/JMuUMxdScGsyH1dccVoye0= 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/work107)] Revert patches X-Act-Checkin: gcc X-Git-Author: Michael Meissner X-Git-Refname: refs/users/meissner/heads/work107 X-Git-Oldrev: 6e41a4798ebc78c62d53e0c0fa0f9fe2eb9bd836 X-Git-Newrev: cdf2510d393f3dbec1cea0fa2da151791e3125ac Message-Id: <20230127165359.9E86F3858C00@sourceware.org> Date: Fri, 27 Jan 2023 16:53:59 +0000 (GMT) List-Id: https://gcc.gnu.org/g:cdf2510d393f3dbec1cea0fa2da151791e3125ac commit cdf2510d393f3dbec1cea0fa2da151791e3125ac Author: Michael Meissner Date: Fri Jan 27 11:53:55 2023 -0500 Revert patches Diff: --- gcc/ChangeLog.meissner | 71 ++----------------------------------- gcc/config/rs6000/rs6000-builtin.cc | 34 ++++++++++-------- 2 files changed, 22 insertions(+), 83 deletions(-) diff --git a/gcc/ChangeLog.meissner b/gcc/ChangeLog.meissner index 6ae64a62d3b..63b9325d363 100644 --- a/gcc/ChangeLog.meissner +++ b/gcc/ChangeLog.meissner @@ -1,73 +1,8 @@ -==================== work107, patch #22 ==================== +==================== work107, patch #22 was reverted ==================== -Update fp conversions #2 +==================== work107, patch #22 was reverted ==================== -2022-01-24 Michael Meissner - -gcc/ - - * config/rs6000/rs6000.md (any_fp_cvt): New code iterator. - (fp_cvt): New code attribute. - (extendkftf2): Replace with kftf2. - (trunctfkf2): Replace with tfkf2. - (extendiftf2): Replace with iftf2. - (trunctfif2): Replace with tfif2. - (kftf2): Add both float_extend and float_truncate versions to - convert between 128-bit floating point types with the same format.. - (tfkf2): Likewise. - (iftf2): Likewise. - (tfif2): Likewise. - -==================== work107, patch #21 ==================== - -Update float 128-bit conversions, PR target/107299. - -This patch is a rewrite of the patch submitted on August 18th: - -| https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599988.html - -This patch reworks the conversions between 128-bit binary floating point types. -Previously, we would call rs6000_expand_float128_convert to do all conversions. -Now, we only define the conversions between the same representation that turn -into a NOP. The appropriate extend or truncate insn is generated, and after -register allocation, it is converted to a move. - -This patch also fixes two places where we want to override the external name -for the conversion function, and the wrong optab was used. Previously, -rs6000_expand_float128_convert would handle the move or generate the call as -needed. Now, it lets the machine independent code generate the call. But if -we use the machine independent code to generate the call, we need to update the -name for two optabs where a truncate would be used in terms of converting -between the modes. This patch updates those two optabs. - -This patch was previously submitted on December 14th, 2022. This patch changes -one built-in function from a FLOAT_TRUNCATE to a FLOAT_EXTEND, which is needed -by the previous patch to genmodes.cc to allow allow the same precision to be -used for various modes. - -2022-01-24 Michael Meissner - -gcc/ - - PR target/107299 - * config/rs6000/rs6000.cc (init_float128_ieee): Use the correct - float_extend or float_truncate optab based on how the machine converts - between IEEE 128-bit and IBM 128-bit. - * config/rs6000/rs6000.md (IFKF): Delete. - (IFKF_reg): Delete. - (extendiftf2): Rewrite to be a move if IFmode and TFmode are both IBM - 128-bit. Do not run if TFmode is IEEE 128-bit. - (extendifkf2): Delete. - (extendtfkf2): Delete. - (extendtfif2): Delete. - (trunciftf2): Delete. - (truncifkf2): Delete. - (trunckftf2): Delete. - (extendkftf2): Implement conversion of IEEE 128-bit types as a move. - (trunctfif2): Delete. - (trunctfkf2): Implement conversion of IEEE 128-bit types as a move. - (extendtf2_internal): Delete. - (extendtf2_internal): Delete. +==================== work107, patch #21 was reverted ==================== ==================== work107, patch #20 ==================== diff --git a/gcc/config/rs6000/rs6000-builtin.cc b/gcc/config/rs6000/rs6000-builtin.cc index 873ae7ce875..737a5c42bfb 100644 --- a/gcc/config/rs6000/rs6000-builtin.cc +++ b/gcc/config/rs6000/rs6000-builtin.cc @@ -730,21 +730,25 @@ rs6000_init_builtins (void) if (TARGET_FLOAT128_TYPE) { - /* For C we only need to register the __ieee128 name for it. For C++, we - create a distinct type which will mangle differently (u9__ieee128) - vs. _Float128 (DF128_) and behave backwards compatibly. - - In the past we used the long double type if long double was IEEE - 128-bit. This leads to differences if _Float128 and __float128 are - not compatible types. In particular, it showed up in generating - signaling NaNs with __builtin_nansf128 and storing it into __float128, - which at the time was based on long double. Because they were - different types, the signaling part of the NaN was lost in the - conversion. */ - if (float128t_type_node == NULL_TREE) - float128t_type_node = build_variant_type_copy (float128_type_node); - - ieee128_float_type_node = float128t_type_node; + if (TARGET_IEEEQUAD && TARGET_LONG_DOUBLE_128) + ieee128_float_type_node = long_double_type_node; + else + { + /* For C we only need to register the __ieee128 name for + it. For C++, we create a distinct type which will mangle + differently (u9__ieee128) vs. _Float128 (DF128_) and behave + backwards compatibly. */ + if (float128t_type_node == NULL_TREE) + { + float128t_type_node = make_node (REAL_TYPE); + TYPE_PRECISION (float128t_type_node) + = TYPE_PRECISION (float128_type_node); + layout_type (float128t_type_node); + SET_TYPE_MODE (float128t_type_node, + TYPE_MODE (float128_type_node)); + } + ieee128_float_type_node = float128t_type_node; + } t = build_qualified_type (ieee128_float_type_node, TYPE_QUAL_CONST); lang_hooks.types.register_builtin_type (ieee128_float_type_node, "__ieee128");