This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR target/69225: Set FLT_EVAL_METHOD to 2 only if 387 FPU is used
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 12 Jan 2016 18:18:12 +0000
- Subject: Re: [PATCH] PR target/69225: Set FLT_EVAL_METHOD to 2 only if 387 FPU is used
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOp=Tq=mCWWAEi82VGJEp_sbF1e4GYMcjQBpK7LFYeUsJg at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1601120014510 dot 15518 at digraph dot polyomino dot org dot uk> <CAFULd4YYp+zKXDh+p45+H+OG30wyi+=ZOgS2tyLk9tXOyjP0jQ at mail dot gmail dot com> <20160112111850 dot GD3017 at tucnak dot redhat dot com> <CAFULd4ZRmtooD2A+G6iWaSpAQvY8Jt1tS582G7bpj7HpjtUxSA at mail dot gmail dot com> <CAFULd4YYwPS_csawghBEpcK=v1bP7sTZ5rZ=TXFRnzgX+f9bgw at mail dot gmail dot com> <20160112124321 dot GG3017 at tucnak dot redhat dot com> <CAFULd4YKy9LUDdvKKr-sHkHsBhYMBrk9A6XROsWSL_UzLEnMvA at mail dot gmail dot com>
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 ? -1 \
> : (TARGET_80387 && !TARGET_SSE_MATH) ? 2 : TARGET_SSE2 ? 0 : -1)
>
> Using this patch, the compiler will still generate SSE instructions
> for the above test.
>
> Joseph, what is your opinion on this approach?
I think this is reasonable.
--
Joseph S. Myers
joseph@codesourcery.com