diff mbox

[i386] : Rewrite FLT_EVAL_METHOD to account for TARGET_SSE2

Message ID CAMe9rOoiEr1mfsu1a7DZreAdi37ZGRfQ1zawDKQ2K46DmUGbeQ@mail.gmail.com
State New
Headers show

Commit Message

H.J. Lu Jan. 13, 2016, 5:09 p.m. UTC
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.
diff mbox

Patch

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