This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, i386]: Rewrite FLT_EVAL_METHOD to account for TARGET_SSE2


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]