public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/meissner/heads/work025)] Undo patch.
@ 2020-11-11  8:28 Michael Meissner
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Meissner @ 2020-11-11  8:28 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:4ba3cfeef8dec6692e667f029c1b2463cceefe80

commit 4ba3cfeef8dec6692e667f029c1b2463cceefe80
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Wed Nov 11 03:27:50 2020 -0500

    Undo patch.
    
    libgcc/
    2020-11-10  Michael Meissner  <meissner@linux.ibm.com>
    
            Undo
            PR libgcc/97543
            PR libgcc/97643
            * config/rs6000/t-linux (IBM128_STATIC_OBJS): New make variable.
            Set all objects to use the explicit IBM format.
            (IBM128_SHARD_CFLAGS): New make variable. Set all objects to use
            the explicit IBM format.
            (IBM128_SHARED_CFLAGS): New make variable.
            (IBM128_STATIC_CFLAGS): New make variable.
            (gcc_s_compile): Add -mno-gnu-attribute to all shared library
            modules.

Diff:
---
 libgcc/config/rs6000/t-linux | 23 -----------------------
 1 file changed, 23 deletions(-)

diff --git a/libgcc/config/rs6000/t-linux b/libgcc/config/rs6000/t-linux
index 43f88ee86ff..ed821947b66 100644
--- a/libgcc/config/rs6000/t-linux
+++ b/libgcc/config/rs6000/t-linux
@@ -6,26 +6,3 @@ HOST_LIBGCC2_CFLAGS += -mlong-double-128
 # smaller and faster libgcc code.  Directly specifying -mcmodel=small
 # would need to take into account targets for which -mcmodel is invalid.
 HOST_LIBGCC2_CFLAGS += -mno-minimal-toc
-
-# On the modules that deal with IBM 128-bit values, make sure that TFmode uses
-# the IBM extended double format.  Also turn off gnu attributes on the static
-# modules.
-IBM128_STATIC_OBJS	= ibm-ldouble$(objext) _powitf2$(objext) \
-			  ppc64-fp$(objext) _divtc3$(object) _multc3$(object) \
-			  _fixtfdi$(object) _fixunstfdi$(object) \
-	                  _floatditf$(objext) _floatunsditf$(objext)
-IBM128_SHARED_OBJS	= $(IBM128_STATIC_OBJS:$(objext):_s$(objext))
-
-IBM128_SHARED_CFLAGS	= -Wno-psabi -mabi=ibmlongdouble
-IBM128_STATIC_CFLAGS	= $(IBM128_SHARED_CFLAGS) -mno-gnu-attribute
-
-$(IBM128_STATIC OBJS) : INTERNAL_CFLAGS += $(IBM128_STATIC_CFLAGS)
-$(IBM128_SHARED OBJS) : INTERNAL_CFLAGS += $(IBM128_SHARED_CFLAGS)
-
-# Turn off gnu attributes for long double size on all of the shared library
-# modules, but leave it on for the static modules, except for the functions
-# that explicitly process IBM 128-bit floating point.  Shared libraries only
-# have one gnu attribute for the whole library, and it can lead to warnings if
-# somebody changes the long double format.  We leave it on for the static
-# modules to catch mis-compilation errors.
-gcc_s_compile += -mno-gnu-attribute


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [gcc(refs/users/meissner/heads/work025)] Undo patch.
@ 2020-11-11 17:58 Michael Meissner
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Meissner @ 2020-11-11 17:58 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:c18116f517228c7248c42f5b743457465fcfed06

commit c18116f517228c7248c42f5b743457465fcfed06
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Wed Nov 11 12:58:31 2020 -0500

    Undo patch.
    
    libgcc/
    2020-11-11  Michael Meissner  <meissner@linux.ibm.com>
    
            Undo
            * config/rs6000/t-float128 (fp128_dec_funcs): New macro.
            (ibm128_dec_funcs): New macro.
            (fp128_ppc_funcs): Add the Decimal <-> __float128 conversions.
            (fp128_dec_objs): Force Decimal <-> __float128 conversions to be
            compiled with -mabi=ieeelongdouble.
            (ibm128_dec_objs): Force Decimal <-> __float128 conversions to be
            compiled with -mabi=ieeelongdouble.
            (FP128_CFLAGS_DECIMAL): New macro.
            (IBM128_CFLAGS_DECIMAL): New macro.

Diff:
---
 libgcc/config/rs6000/t-float128 | 26 +-------------------------
 1 file changed, 1 insertion(+), 25 deletions(-)

diff --git a/libgcc/config/rs6000/t-float128 b/libgcc/config/rs6000/t-float128
index 8b089d4433c..d5413445189 100644
--- a/libgcc/config/rs6000/t-float128
+++ b/libgcc/config/rs6000/t-float128
@@ -22,19 +22,10 @@ fp128_softfp_static_obj	= $(addsuffix -sw$(objext),$(fp128_softfp_funcs))
 fp128_softfp_shared_obj	= $(addsuffix -sw_s$(objext),$(fp128_softfp_funcs))
 fp128_softfp_obj	= $(fp128_softfp_static_obj) $(fp128_softfp_shared_obj)
 
-# Decimal <-> _Float128 conversions
-fp128_dec_funcs		= _kf_to_sd _kf_to_dd _kf_to_td \
-			  _sd_to_kf _dd_to_kf _td_to_kf
-
-# Decimal <-> __ibm128 conversions
-ibm128_dec_funcs	= _tf_to_sd _tf_to_dd _tf_to_td \
-			  _sd_to_tf _dd_to_tf _td_to_tf
-
 # New functions for software emulation
 fp128_ppc_funcs		= floattikf floatuntikf fixkfti fixunskfti \
 			  extendkftf2-sw trunctfkf2-sw \
-			  sfp-exceptions _mulkc3 _divkc3 _powikf2 \
-			  $(fp128_dec_funcs)
+			  sfp-exceptions _mulkc3 _divkc3 _powikf2
 
 fp128_ppc_src		= $(addprefix $(srcdir)/config/rs6000/,$(addsuffix \
 				.c,$(fp128_ppc_funcs)))
@@ -78,21 +69,6 @@ $(fp128_ppc_obj)	 : INTERNAL_CFLAGS += $(FP128_CFLAGS_SW)
 $(fp128_obj)		 : $(fp128_includes)
 $(fp128_obj)		 : $(srcdir)/config/rs6000/quad-float128.h
 
-# Force the TF mode to/from decimal functions to be compiled with IBM long
-# double.  Add building the KF mode to/from decimal conversions with explict
-# IEEE long double.
-fp128_dec_objs		= $(addsuffix $(objext),$(fp128_dec_funcs)) \
-			  $(addsuffix _s$(objext),$(fp128_dec_funcs))
-
-ibm128_dec_objs		= $(addsuffix $(objext),$(ibm128_dec_funcs)) \
-			  $(addsuffix _s$(objext),$(ibm128_dec_funcs))
-
-FP128_CFLAGS_DECIMAL	= -mno-gnu-attribute -Wno-psabi -mabi=ieeelongdouble
-IBM128_CFLAGS_DECIMAL	= -mno-gnu-attribute -Wno-psabi -mabi=ibmlongdouble
-
-$(fp128_dec_objs)	: INTERNAL_CFLAGS += $(FP128_CFLAGS_DECIMAL)
-$(ibm128_dec_objs)	: INTERNAL_CFLAGS += $(IBM128_CFLAGS_DECIMAL)
-
 $(fp128_softfp_src) : $(srcdir)/soft-fp/$(subst -sw,,$(subst kf,tf,$@)) $(fp128_dep)
 	@src="$(srcdir)/soft-fp/$(subst -sw,,$(subst kf,tf,$@))"; \
 	echo "Create $@"; \


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [gcc(refs/users/meissner/heads/work025)] Undo patch
@ 2020-11-11 16:04 Michael Meissner
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Meissner @ 2020-11-11 16:04 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:c04e289b3b7647e4ab544c04228c04335d808716

commit c04e289b3b7647e4ab544c04228c04335d808716
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Wed Nov 11 10:56:50 2020 -0500

    Undo patch
    
    gcc/
    2020-11-10  Michael Meissner  <meissner@linux.ibm.com>
    
            Undo
            PR gcc/97791
            * config/rs6000/rs6000-call.c (init_cumulative_args): Only set
            that long double was returned if the type is actually long
            double.
            (rs6000_function_arg_advance_1): Only set that long double was
            passed if the type is actually long double.
            * config/rs6000/rs6000.c (rs6000_emit_move): Delete code that sets
            whether long double was passed based on the modes used in moves.

Diff:
---
 gcc/config/rs6000/rs6000-call.c | 13 +++++++++----
 gcc/config/rs6000/rs6000.c      | 17 +++++++++++++++++
 2 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-call.c b/gcc/config/rs6000/rs6000-call.c
index 8294e22fb85..3bd89a79bad 100644
--- a/gcc/config/rs6000/rs6000-call.c
+++ b/gcc/config/rs6000/rs6000-call.c
@@ -6539,8 +6539,11 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype,
 	    {
 	      rs6000_passes_float = true;
 	      if ((HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE || TARGET_64BIT)
-		  && return_type != NULL
-		  && TYPE_MAIN_VARIANT (return_type) == long_double_type_node)
+		  && (FLOAT128_IBM_P (return_mode)
+		      || FLOAT128_IEEE_P (return_mode)
+		      || (return_type != NULL
+			  && (TYPE_MAIN_VARIANT (return_type)
+			      == long_double_type_node))))
 		rs6000_passes_long_double = true;
 
 	      /* Note if we passed or return a IEEE 128-bit type.  We changed
@@ -6998,8 +7001,10 @@ rs6000_function_arg_advance_1 (CUMULATIVE_ARGS *cum, machine_mode mode,
 	{
 	  rs6000_passes_float = true;
 	  if ((HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE || TARGET_64BIT)
-	      && type != NULL
-	      && TYPE_MAIN_VARIANT (type) == long_double_type_node)
+	      && (FLOAT128_IBM_P (mode)
+		  || FLOAT128_IEEE_P (mode)
+		  || (type != NULL
+		      && TYPE_MAIN_VARIANT (type) == long_double_type_node)))
 	    rs6000_passes_long_double = true;
 
 	  /* Note if we passed or return a IEEE 128-bit type.  We changed the
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 6edd17a0b69..a76cda09407 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -10081,6 +10081,23 @@ rs6000_emit_move (rtx dest, rtx source, machine_mode mode)
       && GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT)
     gcc_unreachable ();
 
+#ifdef HAVE_AS_GNU_ATTRIBUTE
+  /* If we use a long double type, set the flags in .gnu_attribute that say
+     what the long double type is.  This is to allow the linker's warning
+     message for the wrong long double to be useful, even if the function does
+     not do a call (for example, doing a 128-bit add on power9 if the long
+     double type is IEEE 128-bit.  Do not set this if __ibm128 or __floa128 are
+     used if they aren't the default long dobule type.  */
+  if (rs6000_gnu_attr && (HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE || TARGET_64BIT))
+    {
+      if (TARGET_LONG_DOUBLE_128 && (mode == TFmode || mode == TCmode))
+	rs6000_passes_float = rs6000_passes_long_double = true;
+
+      else if (!TARGET_LONG_DOUBLE_128 && (mode == DFmode || mode == DCmode))
+	rs6000_passes_float = rs6000_passes_long_double = true;
+    }
+#endif
+
   /* See if we need to special case SImode/SFmode SUBREG moves.  */
   if ((mode == SImode || mode == SFmode) && SUBREG_P (source)
       && rs6000_emit_move_si_sf_subreg (dest, source, mode))


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [gcc(refs/users/meissner/heads/work025)] Undo patch.
@ 2020-11-11  8:26 Michael Meissner
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Meissner @ 2020-11-11  8:26 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:bbbcb3b027eef31e489930ae99f39ad9b6e71e84

commit bbbcb3b027eef31e489930ae99f39ad9b6e71e84
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Wed Nov 11 03:25:49 2020 -0500

    Undo patch.
    
    gcc/
    2020-11-10  Michael Meissner  <meissner@linux.ibm.com>
    
            PR gcc/97791
            * config/rs6000/rs6000-call.c (init_cumulative_args): Only set
            that long double was returned if the type is actually long
            double.
            (rs6000_function_arg_advance_1): Only set that long double was
            passed if the type is actually long double.
            * config/rs6000/rs6000.c (rs6000_emit_move): Delete code that sets
            whether long double was passed based on the modes used in moves.

Diff:
---
 gcc/config/rs6000/rs6000-call.c | 13 +++++++++----
 gcc/config/rs6000/rs6000.c      | 17 +++++++++++++++++
 2 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-call.c b/gcc/config/rs6000/rs6000-call.c
index 8294e22fb85..3bd89a79bad 100644
--- a/gcc/config/rs6000/rs6000-call.c
+++ b/gcc/config/rs6000/rs6000-call.c
@@ -6539,8 +6539,11 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype,
 	    {
 	      rs6000_passes_float = true;
 	      if ((HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE || TARGET_64BIT)
-		  && return_type != NULL
-		  && TYPE_MAIN_VARIANT (return_type) == long_double_type_node)
+		  && (FLOAT128_IBM_P (return_mode)
+		      || FLOAT128_IEEE_P (return_mode)
+		      || (return_type != NULL
+			  && (TYPE_MAIN_VARIANT (return_type)
+			      == long_double_type_node))))
 		rs6000_passes_long_double = true;
 
 	      /* Note if we passed or return a IEEE 128-bit type.  We changed
@@ -6998,8 +7001,10 @@ rs6000_function_arg_advance_1 (CUMULATIVE_ARGS *cum, machine_mode mode,
 	{
 	  rs6000_passes_float = true;
 	  if ((HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE || TARGET_64BIT)
-	      && type != NULL
-	      && TYPE_MAIN_VARIANT (type) == long_double_type_node)
+	      && (FLOAT128_IBM_P (mode)
+		  || FLOAT128_IEEE_P (mode)
+		  || (type != NULL
+		      && TYPE_MAIN_VARIANT (type) == long_double_type_node)))
 	    rs6000_passes_long_double = true;
 
 	  /* Note if we passed or return a IEEE 128-bit type.  We changed the
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 6edd17a0b69..a76cda09407 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -10081,6 +10081,23 @@ rs6000_emit_move (rtx dest, rtx source, machine_mode mode)
       && GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT)
     gcc_unreachable ();
 
+#ifdef HAVE_AS_GNU_ATTRIBUTE
+  /* If we use a long double type, set the flags in .gnu_attribute that say
+     what the long double type is.  This is to allow the linker's warning
+     message for the wrong long double to be useful, even if the function does
+     not do a call (for example, doing a 128-bit add on power9 if the long
+     double type is IEEE 128-bit.  Do not set this if __ibm128 or __floa128 are
+     used if they aren't the default long dobule type.  */
+  if (rs6000_gnu_attr && (HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE || TARGET_64BIT))
+    {
+      if (TARGET_LONG_DOUBLE_128 && (mode == TFmode || mode == TCmode))
+	rs6000_passes_float = rs6000_passes_long_double = true;
+
+      else if (!TARGET_LONG_DOUBLE_128 && (mode == DFmode || mode == DCmode))
+	rs6000_passes_float = rs6000_passes_long_double = true;
+    }
+#endif
+
   /* See if we need to special case SImode/SFmode SUBREG moves.  */
   if ((mode == SImode || mode == SFmode) && SUBREG_P (source)
       && rs6000_emit_move_si_sf_subreg (dest, source, mode))


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-11 17:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-11  8:28 [gcc(refs/users/meissner/heads/work025)] Undo patch Michael Meissner
  -- strict thread matches above, loose matches on Subject: below --
2020-11-11 17:58 Michael Meissner
2020-11-11 16:04 Michael Meissner
2020-11-11  8:26 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).