public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/meissner/heads/work100)] Allow __ibm128 with -msoft-float (PR target/105334)
@ 2022-09-09 18:15 Michael Meissner
  0 siblings, 0 replies; only message in thread
From: Michael Meissner @ 2022-09-09 18:15 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:5b604c7aec602ea2236b10f604f5093b1911bd92

commit 5b604c7aec602ea2236b10f604f5093b1911bd92
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Fri Sep 9 14:13:00 2022 -0400

    Allow __ibm128 with -msoft-float (PR target/105334)
    
    This patch allows __ibm128 to be used on systems with software floating point
    enabled.  Previously, we required hardware floating point to be enabled to use
    __ibm128 keyword and the __ibm128 built-in functions.  This patch fixes PR
    target/105334.
    
    2022-09-09   Michael Meissner  <meissner@linux.ibm.com>
    
    gcc/
    
            PR target/105334
            * config/rs6000/rs6000.cc (init_float128_ibm): Do not require hardware
            floating point for the IBM 128-bit floating point comparison functions.
            * config/rs6000/rs6000.h (FLOAT128_IBM_P): Do not require hardware
            floating point to enable recognizing IBM 128-bit floating point modes.

Diff:
---
 gcc/config/rs6000/rs6000.cc | 37 +++++++++++++++++--------------------
 gcc/config/rs6000/rs6000.h  |  2 +-
 2 files changed, 18 insertions(+), 21 deletions(-)

diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
index 00fe4c6ab28..1c5436208f1 100644
--- a/gcc/config/rs6000/rs6000.cc
+++ b/gcc/config/rs6000/rs6000.cc
@@ -10910,26 +10910,23 @@ init_float128_ibm (machine_mode mode)
       set_optab_libfunc (smul_optab, mode, "__gcc_qmul");
       set_optab_libfunc (sdiv_optab, mode, "__gcc_qdiv");
 
-      if (!TARGET_HARD_FLOAT)
-	{
-	  set_optab_libfunc (neg_optab, mode, "__gcc_qneg");
-	  set_optab_libfunc (eq_optab, mode, "__gcc_qeq");
-	  set_optab_libfunc (ne_optab, mode, "__gcc_qne");
-	  set_optab_libfunc (gt_optab, mode, "__gcc_qgt");
-	  set_optab_libfunc (ge_optab, mode, "__gcc_qge");
-	  set_optab_libfunc (lt_optab, mode, "__gcc_qlt");
-	  set_optab_libfunc (le_optab, mode, "__gcc_qle");
-	  set_optab_libfunc (unord_optab, mode, "__gcc_qunord");
-
-	  set_conv_libfunc (sext_optab, mode, SFmode, "__gcc_stoq");
-	  set_conv_libfunc (sext_optab, mode, DFmode, "__gcc_dtoq");
-	  set_conv_libfunc (trunc_optab, SFmode, mode, "__gcc_qtos");
-	  set_conv_libfunc (trunc_optab, DFmode, mode, "__gcc_qtod");
-	  set_conv_libfunc (sfix_optab, SImode, mode, "__gcc_qtoi");
-	  set_conv_libfunc (ufix_optab, SImode, mode, "__gcc_qtou");
-	  set_conv_libfunc (sfloat_optab, mode, SImode, "__gcc_itoq");
-	  set_conv_libfunc (ufloat_optab, mode, SImode, "__gcc_utoq");
-	}
+      set_optab_libfunc (neg_optab, mode, "__gcc_qneg");
+      set_optab_libfunc (eq_optab, mode, "__gcc_qeq");
+      set_optab_libfunc (ne_optab, mode, "__gcc_qne");
+      set_optab_libfunc (gt_optab, mode, "__gcc_qgt");
+      set_optab_libfunc (ge_optab, mode, "__gcc_qge");
+      set_optab_libfunc (lt_optab, mode, "__gcc_qlt");
+      set_optab_libfunc (le_optab, mode, "__gcc_qle");
+      set_optab_libfunc (unord_optab, mode, "__gcc_qunord");
+
+      set_conv_libfunc (sext_optab, mode, SFmode, "__gcc_stoq");
+      set_conv_libfunc (sext_optab, mode, DFmode, "__gcc_dtoq");
+      set_conv_libfunc (trunc_optab, SFmode, mode, "__gcc_qtos");
+      set_conv_libfunc (trunc_optab, DFmode, mode, "__gcc_qtod");
+      set_conv_libfunc (sfix_optab, SImode, mode, "__gcc_qtoi");
+      set_conv_libfunc (ufix_optab, SImode, mode, "__gcc_qtou");
+      set_conv_libfunc (sfloat_optab, mode, SImode, "__gcc_itoq");
+      set_conv_libfunc (ufloat_optab, mode, SImode, "__gcc_utoq");
     }
   else
     {
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index ee14aa974c1..a52e36dfe22 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -337,7 +337,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
 #define FLOAT128_IBM_P(MODE)						\
   ((!TARGET_IEEEQUAD && TARGET_LONG_DOUBLE_128				\
     && ((MODE) == TFmode || (MODE) == TCmode))				\
-   || (TARGET_HARD_FLOAT && ((MODE) == IFmode || (MODE) == ICmode)))
+   || ((MODE) == IFmode || (MODE) == ICmode))
 
 /* Helper macros to say whether a 128-bit floating point type can go in a
    single vector register, or whether it needs paired scalar values.  */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-09 18:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-09 18:15 [gcc(refs/users/meissner/heads/work100)] Allow __ibm128 with -msoft-float (PR target/105334) Michael Meissner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).