On Tue, Jan 12, 2016 at 7:18 PM, Joseph Myers <jos...@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  <ubiz...@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.
Index: i386.h
===================================================================
--- i386.h      (revision 232293)
+++ i386.h      (working copy)
@@ -693,8 +693,11 @@
    only SSE, rounding is correct; when using both SSE and the FPU,
    the rounding precision is indeterminate, since either may be chosen
    apparently at random.  */
-#define TARGET_FLT_EVAL_METHOD \
-  (TARGET_MIX_SSE_I387 ? -1 : (TARGET_80387 && !TARGET_SSE_MATH) ? 2 : 0)
+#define TARGET_FLT_EVAL_METHOD                                         \
+  (TARGET_80387                                                                
\
+   ? (TARGET_MIX_SSE_I387 ? -1                                         \
+      : (TARGET_SSE_MATH ? (TARGET_SSE2 ? 0 : -1) : 2))                        
\
+   : 0)
 
 /* Whether to allow x87 floating-point arithmetic on MODE (one of
    SFmode, DFmode and XFmode) in the current excess precision

Reply via email to