diff mbox series

Power10: Add missing IEEE 128-bit XSCMP* built-in mappings.

Message ID 20201120154219.GA11513@ibm-toto.the-meissners.org
State New
Headers show
Series Power10: Add missing IEEE 128-bit XSCMP* built-in mappings. | expand

Commit Message

Michael Meissner Nov. 20, 2020, 3:42 p.m. UTC
Power10: Add missing IEEE 128-bit XSCMP* built-in mappings.

This patch is a simplification of earlier patches to fix the built-in functions
that introduced new power10 IEEE 128-bit instructions.  Some of the built-in
functions were already handled, but the scalar_cmp_exp_qp_gt, etc. functions
were not handled.  This shows up in the float128-cmp2-runnable.c test when long
double uses the IEEE 128-bit representation.

I had done the previous patches fairly quickly, forgetting about the switch
inside of rs6000_expand_builtin in rs6000-call.c that switches between KF and
TF built-in functions without having to add overloaded function names.  This
patch uses that simpler method.

The previous patches were at:

Date: Thu, 24 Sep 2020 16:42:59 -0400
Subject: [PATCH 7/9] PowerPC: Update IEEE 128-bit built-in functions to work if long double is IEEE 128-bit.
Message-ID: <20200924204259.GG31597@ibm-toto.the-meissners.org>

Date: Thu, 22 Oct 2020 18:03:46 -0400
Subject: PowerPC: Map IEEE 128-bit long double built-in functions
Message-ID: <20201022220346.GA8151@ibm-toto.the-meissners.org>

I have built two sets of bootstrap compilers on a little endian power9 server
system running Linux.  One compiler used the default IBM IEEE 128-bit long
double support and the other used IEEE 128-bit for the long double.  This patch
fixes the failure in the float128-cmp2-runnable.c test, and it adds no other
regressions.  Can I check this patch into the master branch?


2020-11-18  Michael Meissner  <meissner@linux.ibm.com>

	* config/rs6000/rs6000-call.c (rs6000_expand_builtin): Add missing
	XSCMP* cases for IEEE 128-bit long double.
---
 gcc/config/rs6000/rs6000-call.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Comments

Segher Boessenkool Nov. 20, 2020, 6:34 p.m. UTC | #1
On Fri, Nov 20, 2020 at 10:42:19AM -0500, Michael Meissner wrote:
> Power10: Add missing IEEE 128-bit XSCMP* built-in mappings.

Okay for trunk (and needed backports after waiting for possible
fallout).  Thanks!


Segher


> 2020-11-18  Michael Meissner  <meissner@linux.ibm.com>
> 
> 	* config/rs6000/rs6000-call.c (rs6000_expand_builtin): Add missing
> 	XSCMP* cases for IEEE 128-bit long double.
diff mbox series

Patch

diff --git a/gcc/config/rs6000/rs6000-call.c b/gcc/config/rs6000/rs6000-call.c
index 8294e22fb85..1fdb39f15c0 100644
--- a/gcc/config/rs6000/rs6000-call.c
+++ b/gcc/config/rs6000/rs6000-call.c
@@ -12803,6 +12803,22 @@  rs6000_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
       case CODE_FOR_xsiexpqp_kf:	icode = CODE_FOR_xsiexpqp_tf;	break;
       case CODE_FOR_xsiexpqpf_kf:	icode = CODE_FOR_xsiexpqpf_tf;	break;
       case CODE_FOR_xststdcqp_kf:	icode = CODE_FOR_xststdcqp_tf;	break;
+
+      case CODE_FOR_xscmpexpqp_eq_kf:
+	icode = CODE_FOR_xscmpexpqp_eq_tf;
+	break;
+
+      case CODE_FOR_xscmpexpqp_lt_kf:
+	icode = CODE_FOR_xscmpexpqp_lt_tf;
+	break;
+
+      case CODE_FOR_xscmpexpqp_gt_kf:
+	icode = CODE_FOR_xscmpexpqp_gt_tf;
+	break;
+
+      case CODE_FOR_xscmpexpqp_unordered_kf:
+	icode = CODE_FOR_xscmpexpqp_unordered_tf;
+	break;
       }
 
   if (TARGET_DEBUG_BUILTIN)