public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch] Remove all uses of TARGET_FLT_EVAL_METHOD_NON_DEFAULT and poison it
@ 2016-09-22 17:04 James Greenhalgh
  2016-09-22 18:05 ` Joseph Myers
  0 siblings, 1 reply; 4+ messages in thread
From: James Greenhalgh @ 2016-09-22 17:04 UTC (permalink / raw)
  To: gcc-patches; +Cc: nd, joseph, rth, charlet, ebotcazou, aph, tromey, fortran

[-- Attachment #1: Type: text/plain, Size: 2038 bytes --]


Hi,

I'm going to hookize TARGET_FLT_EVAL_METHOD, so the current definition
of TARGET_FLT_EVAL_METHOD_NON_DEFAULT will stop working.

I looked in to ways of redefining this macro, but each that I explored would
require pulling in target.h in front-ends that don't otherwise need it.

Rather than do that, I thought about the purpose of this macro, which is
to permit a relaxation of the rule that -fexcess-precision=standard
requires front-end specific code to work if the target had no definition of
TARGET_FLT_EVAL_METHOD. That makes -fexcess-precision=standard with a
language other than C not-portable, and in particular it won't work with
any of the i386 backend targets.

The relaxation isn't portable, and keeping it in place is tricky, so this
patch removes it, and poisons TARGET_FLT_EVAL_METHOD_NON_DEFAULT in
system.h to prevent future use.

Bootstrapped and tested on x86_64 with --enable-languages=all,ada,go,obj-c++
with no issues.

OK?

Thanks,
James

---

gcc/

2016-09-22  James Greenhalgh  <james.greenhalgh@arm.com>

	* defaults.h (TARGET_FLT_EVAL_METHOD_NON_DEFAULT): Remove.
	* system.h (TARGET_FLT_EVAL_METHOD_NON_DEFAULT): Poison.

gcc/c-family/

2016-09-22  James Greenhalgh  <james.greenhalgh@arm.com>

	* c-opts.c (c_common_post_options): Remove special case for
	TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
	in C++.

gcc/java/

2016-09-22  James Greenhalgh  <james.greenhalgh@arm.com>

	* lang.c (java_post_options): Remove special case for
	TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard.

gcc/fortran/

2016-09-22  James Greenhalgh  <james.greenhalgh@arm.com>

	* options.c (gfc_post_options): Remove special case for
	TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard.

gcc/ada/

2016-09-22  James Greenhalgh  <james.greenhalgh@arm.com>

	* gcc-interface/misc.c (gnat_post_options): Remove special case for
	TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Patch-Remove-all-uses-of-TARGET_FLT_EVAL_METHOD_NON_.patch --]
[-- Type: text/x-patch;  name=0001-Patch-Remove-all-uses-of-TARGET_FLT_EVAL_METHOD_NON_.patch, Size: 3627 bytes --]

diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c
index b240bc5..236a083 100644
--- a/gcc/ada/gcc-interface/misc.c
+++ b/gcc/ada/gcc-interface/misc.c
@@ -255,8 +255,7 @@ static bool
 gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED)
 {
   /* Excess precision other than "fast" requires front-end support.  */
-  if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD
-      && TARGET_FLT_EVAL_METHOD_NON_DEFAULT)
+  if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD)
     sorry ("-fexcess-precision=standard for Ada");
   flag_excess_precision_cmdline = EXCESS_PRECISION_FAST;
 
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index e83944c..5fe3132 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -770,8 +770,7 @@ c_common_post_options (const char **pfilename)
      support.  */
   if (c_dialect_cxx ())
     {
-      if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD
-	  && TARGET_FLT_EVAL_METHOD_NON_DEFAULT)
+      if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD)
 	sorry ("-fexcess-precision=standard for C++");
       flag_excess_precision_cmdline = EXCESS_PRECISION_FAST;
     }
diff --git a/gcc/defaults.h b/gcc/defaults.h
index af8fe91..c62c844 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -963,11 +963,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define REG_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
 #endif
 
-#ifdef TARGET_FLT_EVAL_METHOD
-#define TARGET_FLT_EVAL_METHOD_NON_DEFAULT 1
-#else
+#ifndef TARGET_FLT_EVAL_METHOD
 #define TARGET_FLT_EVAL_METHOD 0
-#define TARGET_FLT_EVAL_METHOD_NON_DEFAULT 0
 #endif
 
 #ifndef TARGET_DEC_EVAL_METHOD
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index 4aa8303..1b6984f 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -209,8 +209,7 @@ gfc_post_options (const char **pfilename)
 
   /* Excess precision other than "fast" requires front-end
      support.  */
-  if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD
-      && TARGET_FLT_EVAL_METHOD_NON_DEFAULT)
+  if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD)
     sorry ("-fexcess-precision=standard for Fortran");
   flag_excess_precision_cmdline = EXCESS_PRECISION_FAST;
 
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index 1c6dde4..65025ee 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -569,8 +569,7 @@ java_post_options (const char **pfilename)
 
   /* Excess precision other than "fast" requires front-end
      support.  */
-  if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD
-      && TARGET_FLT_EVAL_METHOD_NON_DEFAULT)
+  if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD)
     sorry ("-fexcess-precision=standard for Java");
   flag_excess_precision_cmdline = EXCESS_PRECISION_FAST;
 
diff --git a/gcc/system.h b/gcc/system.h
index 8a17197..e8f4dd9 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -976,7 +976,8 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
 	EXTRA_ADDRESS_CONSTRAINT CONST_DOUBLE_OK_FOR_CONSTRAINT_P	   \
 	CALLER_SAVE_PROFITABLE LARGEST_EXPONENT_IS_NORMAL		   \
 	ROUND_TOWARDS_ZERO SF_SIZE DF_SIZE XF_SIZE TF_SIZE LIBGCC2_TF_CEXT \
-	LIBGCC2_LONG_DOUBLE_TYPE_SIZE STRUCT_VALUE EH_FRAME_IN_DATA_SECTION
+	LIBGCC2_LONG_DOUBLE_TYPE_SIZE STRUCT_VALUE			   \
+	EH_FRAME_IN_DATA_SECTION TARGET_FLT_EVAL_METHOD_NON_DEFAULT
 
 /* Hooks that are no longer used.  */
  #pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE	\

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

* Re: [Patch] Remove all uses of TARGET_FLT_EVAL_METHOD_NON_DEFAULT and poison it
  2016-09-22 17:04 [Patch] Remove all uses of TARGET_FLT_EVAL_METHOD_NON_DEFAULT and poison it James Greenhalgh
@ 2016-09-22 18:05 ` Joseph Myers
  2016-09-28 16:27   ` James Greenhalgh
  0 siblings, 1 reply; 4+ messages in thread
From: Joseph Myers @ 2016-09-22 18:05 UTC (permalink / raw)
  To: James Greenhalgh
  Cc: gcc-patches, nd, rth, charlet, ebotcazou, aph, tromey, fortran

On Thu, 22 Sep 2016, James Greenhalgh wrote:

> The relaxation isn't portable, and keeping it in place is tricky, so this
> patch removes it, and poisons TARGET_FLT_EVAL_METHOD_NON_DEFAULT in
> system.h to prevent future use.
> 
> Bootstrapped and tested on x86_64 with --enable-languages=all,ada,go,obj-c++
> with no issues.
> 
> OK?

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com

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

* Re: [Patch] Remove all uses of TARGET_FLT_EVAL_METHOD_NON_DEFAULT and poison it
  2016-09-22 18:05 ` Joseph Myers
@ 2016-09-28 16:27   ` James Greenhalgh
  2016-09-28 18:02     ` Joseph Myers
  0 siblings, 1 reply; 4+ messages in thread
From: James Greenhalgh @ 2016-09-28 16:27 UTC (permalink / raw)
  To: Joseph Myers
  Cc: gcc-patches, nd, rth, charlet, ebotcazou, aph, tromey, fortran

On Thu, Sep 22, 2016 at 05:55:21PM +0000, Joseph Myers wrote:
> On Thu, 22 Sep 2016, James Greenhalgh wrote:
> 
> > The relaxation isn't portable, and keeping it in place is tricky, so this
> > patch removes it, and poisons TARGET_FLT_EVAL_METHOD_NON_DEFAULT in
> > system.h to prevent future use.
> > 
> > Bootstrapped and tested on x86_64 with --enable-languages=all,ada,go,obj-c++
> > with no issues.
> > 
> > OK?
> 
> OK.

Hi Joseph,

Is this OK sufficient for me to commit the patch, or must I wait for input
from the other CCed front-end maintainers?

Thanks,
James

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

* Re: [Patch] Remove all uses of TARGET_FLT_EVAL_METHOD_NON_DEFAULT and poison it
  2016-09-28 16:27   ` James Greenhalgh
@ 2016-09-28 18:02     ` Joseph Myers
  0 siblings, 0 replies; 4+ messages in thread
From: Joseph Myers @ 2016-09-28 18:02 UTC (permalink / raw)
  To: James Greenhalgh
  Cc: gcc-patches, nd, rth, charlet, ebotcazou, aph, tromey, fortran

On Wed, 28 Sep 2016, James Greenhalgh wrote:

> On Thu, Sep 22, 2016 at 05:55:21PM +0000, Joseph Myers wrote:
> > On Thu, 22 Sep 2016, James Greenhalgh wrote:
> > 
> > > The relaxation isn't portable, and keeping it in place is tricky, so this
> > > patch removes it, and poisons TARGET_FLT_EVAL_METHOD_NON_DEFAULT in
> > > system.h to prevent future use.
> > > 
> > > Bootstrapped and tested on x86_64 with --enable-languages=all,ada,go,obj-c++
> > > with no issues.
> > > 
> > > OK?
> > 
> > OK.
> 
> Hi Joseph,
> 
> Is this OK sufficient for me to commit the patch, or must I wait for input
> from the other CCed front-end maintainers?

It is sufficient for you to commit the patch.

-- 
Joseph S. Myers
joseph@codesourcery.com

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

end of thread, other threads:[~2016-09-28 17:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-22 17:04 [Patch] Remove all uses of TARGET_FLT_EVAL_METHOD_NON_DEFAULT and poison it James Greenhalgh
2016-09-22 18:05 ` Joseph Myers
2016-09-28 16:27   ` James Greenhalgh
2016-09-28 18:02     ` Joseph Myers

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).