Re: [PATCH] PR target/69225: Set FLT_EVAL_METHOD to 2 only if 387 FPU is used

2016-01-12 Thread Joseph Myers
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: > > #define TARGET_FLT_EVAL_METHOD\ > (TARGET_MIX_SSE_I387 ?

Re: [PATCH] PR target/69225: Set FLT_EVAL_METHOD to 2 only if 387 FPU is used

2016-01-12 Thread Uros Bizjak
On Tue, Jan 12, 2016 at 1:43 PM, Jakub Jelinek wrote: > On Tue, Jan 12, 2016 at 01:32:05PM +0100, Uros Bizjak wrote: >> Using this patch, SSE math won't be emitted for a simple testcase >> using " -O2 -msse -m32 -std=c99 -mfpmath=sse" compile flags: >> >> float test (float a, float b) >> { >> re

Re: [PATCH] PR target/69225: Set FLT_EVAL_METHOD to 2 only if 387 FPU is used

2016-01-12 Thread Jakub Jelinek
On Tue, Jan 12, 2016 at 01:32:05PM +0100, Uros Bizjak wrote: > Using this patch, SSE math won't be emitted for a simple testcase > using " -O2 -msse -m32 -std=c99 -mfpmath=sse" compile flags: > > float test (float a, float b) > { > return a + b; > } > > since we start with: > > test (float a,

Re: [PATCH] PR target/69225: Set FLT_EVAL_METHOD to 2 only if 387 FPU is used

2016-01-12 Thread Uros Bizjak
On Tue, Jan 12, 2016 at 1:12 PM, Uros Bizjak wrote: > On Tue, Jan 12, 2016 at 12:18 PM, Jakub Jelinek wrote: >> On Tue, Jan 12, 2016 at 12:10:20PM +0100, Uros Bizjak wrote: >>> On Tue, Jan 12, 2016 at 1:15 AM, Joseph Myers >>> wrote: >>> > On Mon, 11 Jan 2016, H.J. Lu wrote: >>> > >>> >> Here i

Re: [PATCH] PR target/69225: Set FLT_EVAL_METHOD to 2 only if 387 FPU is used

2016-01-12 Thread Uros Bizjak
On Tue, Jan 12, 2016 at 12:18 PM, Jakub Jelinek wrote: > On Tue, Jan 12, 2016 at 12:10:20PM +0100, Uros Bizjak wrote: >> On Tue, Jan 12, 2016 at 1:15 AM, Joseph Myers >> wrote: >> > On Mon, 11 Jan 2016, H.J. Lu wrote: >> > >> >> Here is the updated patch. Joseph, is this OK? >> > >> > I have no

Re: [PATCH] PR target/69225: Set FLT_EVAL_METHOD to 2 only if 387 FPU is used

2016-01-12 Thread Jakub Jelinek
On Tue, Jan 12, 2016 at 12:10:20PM +0100, Uros Bizjak wrote: > On Tue, Jan 12, 2016 at 1:15 AM, Joseph Myers wrote: > > On Mon, 11 Jan 2016, H.J. Lu wrote: > > > >> Here is the updated patch. Joseph, is this OK? > > > > I have no objections to this patch. > > Thinking some more, it looks to me t

Re: [PATCH] PR target/69225: Set FLT_EVAL_METHOD to 2 only if 387 FPU is used

2016-01-12 Thread Uros Bizjak
On Tue, Jan 12, 2016 at 1:15 AM, Joseph Myers wrote: > On Mon, 11 Jan 2016, H.J. Lu wrote: > >> Here is the updated patch. Joseph, is this OK? > > I have no objections to this patch. Thinking some more, it looks to me that we also have to return 2 when SSE2 (SSE doubles) is not enabled. I'm tes

Re: [PATCH] PR target/69225: Set FLT_EVAL_METHOD to 2 only if 387 FPU is used

2016-01-11 Thread Joseph Myers
On Mon, 11 Jan 2016, H.J. Lu wrote: > Here is the updated patch. Joseph, is this OK? I have no objections to this patch. -- Joseph S. Myers jos...@codesourcery.com

[PATCH] PR target/69225: Set FLT_EVAL_METHOD to 2 only if 387 FPU is used

2016-01-11 Thread H.J. Lu
On Mon, Jan 11, 2016 at 8:15 AM, Uros Bizjak wrote: > On Mon, Jan 11, 2016 at 3:52 PM, H.J. Lu wrote: >> When FPU isn't used, there is no excess precision. We should set >> FLT_EVAL_METHOD to 0 if 387 is disabled. >> >> OK for trunk? >> >> Thanks. >> >> H.J. >> --- >> gcc/ >> >> PR targe