public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Allow other languages to change long double format on PowerPC
@ 2022-01-12 17:46 Michael Meissner
  2022-01-12 17:50 ` Jakub Jelinek
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Meissner @ 2022-01-12 17:46 UTC (permalink / raw)
  To: gcc-patches, Michael Meissner, Segher Boessenkool,
	David Edelsohn, Bill Schmidt, Peter Bergner, Will Schmidt

Allow other languages to change long double format on PowerPC.

With Fortran adding support for changing the long double format, this
patch removes the code that only allowed C/C++ to change the long double
format for GLIBC 2.32 and later without a warning.

I have bootstraped the compiler with this change and there where no
regressesion.  In addition, I have applied it to the power-ieee128 branch where
the work is being done to add support for both types of 128-bit floating point
on PowerPC.  If I build a compiler from that branch, I can change the 128-bit
floating point format at compile time.

Can I check this patch into the trunk GCC compiler?

gcc/
2022-01-12  Michael Meissner  <meissner@the-meissners.org>

	* config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
	checks for only C/C++ front ends before allowing the long double
	format to change without a warning.
---
 gcc/config/rs6000/rs6000.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 319182e94d9..0e3481c8327 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -4221,13 +4221,11 @@ rs6000_option_override_internal (bool global_init_p)
       if (rs6000_ieeequad != TARGET_IEEEQUAD_DEFAULT && TARGET_LONG_DOUBLE_128)
 	{
 	  /* Determine if the user can change the default long double type at
-	     compilation time.  Only C and C++ support this, and you need GLIBC
-	     2.32 or newer.  Only issue one warning.  */
+	     compilation time.  You need GLIBC 2.32 or newer to be able to
+	     change the long double type.  Only issue one warning.  */
 	  static bool warned_change_long_double;
 
-	  if (!warned_change_long_double
-	      && (!glibc_supports_ieee_128bit ()
-		  || (!lang_GNU_C () && !lang_GNU_CXX ())))
+	  if (!warned_change_long_double && !glibc_supports_ieee_128bit ())
 	    {
 	      warned_change_long_double = true;
 	      if (TARGET_IEEEQUAD)
-- 
2.33.1


-- 
Michael Meissner, IBM
PO Box 98, Ayer, Massachusetts, USA, 01432
email: meissner@linux.ibm.com

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

* Re: [PATCH] Allow other languages to change long double format on PowerPC
  2022-01-12 17:46 [PATCH] Allow other languages to change long double format on PowerPC Michael Meissner
@ 2022-01-12 17:50 ` Jakub Jelinek
  2022-01-12 17:56   ` Michael Meissner
  0 siblings, 1 reply; 3+ messages in thread
From: Jakub Jelinek @ 2022-01-12 17:50 UTC (permalink / raw)
  To: Michael Meissner, gcc-patches, Segher Boessenkool,
	David Edelsohn, Bill Schmidt, Peter Bergner, Will Schmidt

On Wed, Jan 12, 2022 at 12:46:16PM -0500, Michael Meissner via Gcc-patches wrote:
> Allow other languages to change long double format on PowerPC.
> 
> With Fortran adding support for changing the long double format, this
> patch removes the code that only allowed C/C++ to change the long double
> format for GLIBC 2.32 and later without a warning.
> 
> I have bootstraped the compiler with this change and there where no
> regressesion.  In addition, I have applied it to the power-ieee128 branch where
> the work is being done to add support for both types of 128-bit floating point
> on PowerPC.  If I build a compiler from that branch, I can change the 128-bit
> floating point format at compile time.
> 
> Can I check this patch into the trunk GCC compiler?
> 
> gcc/
> 2022-01-12  Michael Meissner  <meissner@the-meissners.org>
> 
> 	* config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
> 	checks for only C/C++ front ends before allowing the long double
> 	format to change without a warning.

This is already on the trunk, I've merged the power-ieee128 branch changes
into trunk yesterday (r12-6491 through r12-6508 commits inclusive).
This patch in particular as r12-6503-g7d8011fa00fca283003c84e23a8ca66286f83dfa.

	Jakub


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

* Re: [PATCH] Allow other languages to change long double format on PowerPC
  2022-01-12 17:50 ` Jakub Jelinek
@ 2022-01-12 17:56   ` Michael Meissner
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Meissner @ 2022-01-12 17:56 UTC (permalink / raw)
  To: Jakub Jelinek
  Cc: Michael Meissner, gcc-patches, Segher Boessenkool,
	David Edelsohn, Bill Schmidt, Peter Bergner, Will Schmidt

On Wed, Jan 12, 2022 at 06:50:04PM +0100, Jakub Jelinek wrote:
> On Wed, Jan 12, 2022 at 12:46:16PM -0500, Michael Meissner via Gcc-patches wrote:
> > Allow other languages to change long double format on PowerPC.
> > 
> > With Fortran adding support for changing the long double format, this
> > patch removes the code that only allowed C/C++ to change the long double
> > format for GLIBC 2.32 and later without a warning.
> > 
> > I have bootstraped the compiler with this change and there where no
> > regressesion.  In addition, I have applied it to the power-ieee128 branch where
> > the work is being done to add support for both types of 128-bit floating point
> > on PowerPC.  If I build a compiler from that branch, I can change the 128-bit
> > floating point format at compile time.
> > 
> > Can I check this patch into the trunk GCC compiler?
> > 
> > gcc/
> > 2022-01-12  Michael Meissner  <meissner@the-meissners.org>
> > 
> > 	* config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
> > 	checks for only C/C++ front ends before allowing the long double
> > 	format to change without a warning.
> 
> This is already on the trunk, I've merged the power-ieee128 branch changes
> into trunk yesterday (r12-6491 through r12-6508 commits inclusive).
> This patch in particular as r12-6503-g7d8011fa00fca283003c84e23a8ca66286f83dfa.

Thanks.  I didn't notice that the patches had been merged into the trunk.

-- 
Michael Meissner, IBM
PO Box 98, Ayer, Massachusetts, USA, 01432
email: meissner@linux.ibm.com

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

end of thread, other threads:[~2022-01-12 17:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12 17:46 [PATCH] Allow other languages to change long double format on PowerPC Michael Meissner
2022-01-12 17:50 ` Jakub Jelinek
2022-01-12 17:56   ` 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).