This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386]: Rewrite FLT_EVAL_METHOD to account for TARGET_SSE2
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: Joseph Myers <joseph at codesourcery dot com>, Jakub Jelinek <jakub at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 13 Jan 2016 09:09:00 -0800
- Subject: Re: [PATCH, i386]: Rewrite FLT_EVAL_METHOD to account for TARGET_SSE2
- Authentication-results: sourceware.org; auth=none
- References: <CAFULd4ZBkGgjhkZwXJCMkPLJoeNNrfRvrmZtGPAkVTejv3AoXw at mail dot gmail dot com>
On Wed, Jan 13, 2016 at 8:44 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Tue, Jan 12, 2016 at 7:18 PM, Joseph Myers <joseph@codesourcery.com> wrote:
>> On Tue, 12 Jan 2016, Uros Bizjak wrote:
>>
>>> I think that following definition describes -msse -mfpmath=sse
>>> situation in the most elegant way. We can just declare that the
>>> precision is not known in this case:
>
> Attached patch rewrites FLT_EVAL_METHOD to account for TARGET_SSE2.
>
> 2016-01-13 Uros Bizjak <ubizjak@gmail.com>
>
> * config/i386/i386.h (TARGET_FLT_EVAL_METHOD): Return -1 for
> TARGET_SSE_MATH without TARGET_SSE2. Rewrite.
>
> Bootstrapped and regression tested on x86_64-linux-gnu {,-m32},
> committed to mainline SVN.
>
> Uros.
I checked in this testcase which fails without the change above.
Thanks.
--
H.J.
---
Index: ChangeLog
===================================================================
--- ChangeLog (revision 232329)
+++ ChangeLog (working copy)
@@ -1,3 +1,7 @@
+2016-01-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/pr69225-7.c: New test.
+
2016-01-13 Uros Bizjak <ubizjak@gmail.com>
* gcc.target/i386/pr45685.c (dg-options): Add -mno-sse4.
Index: gcc.target/i386/pr69225-7.c
===================================================================
--- gcc.target/i386/pr69225-7.c (nonexistent)
+++ gcc.target/i386/pr69225-7.c (working copy)
@@ -0,0 +1,8 @@
+/* { dg-do compile} */
+/* { dg-options "-msse -mno-sse2 -m80387 -mfpmath=sse" } */
+
+#include <float.h>
+
+#if FLT_EVAL_METHOD != -1
+# error FLT_EVAL_METHOD != -1
+#endif