This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, i386]: Disable only appropriate x87 builtins for-mfpmath=sse
- From: Roger Sayle <roger at eyesopen dot com>
- To: Uros Bizjak <uros at kss-loka dot si>
- Cc: gcc-patches at gcc dot gnu dot org, Richard Henderson <rth at redhat dot com>
- Date: Fri, 14 Jan 2005 05:44:30 -0700 (MST)
- Subject: Re: [PATCH, i386]: Disable only appropriate x87 builtins for-mfpmath=sse
On Fri, 14 Jan 2005, Uros Bizjak wrote:
> There is no point to disable XFmode x87 builtins or DFmode x87 builtins
> for !TARGET_SSE2, as there will be no SSE<->x87 register shuffling in
> this case. Because this patch will revert Roger's patch from
> 2004-11-24, I would like to hear his opinion on this alternative
I'll let RTH actually review the content, but I think this approach
is an improvement over my 2004-11-24 "hammer". We'd realized that
mixing SSE and x87 had serious issues, so the disabling of x87 when
using -mfpmath=sse was effective but not subtle. As you point out,
with SSE2 we can/should continue to use x87 builtins for long double
(XFmode) functions, and with SSE for both long double (XFmode) and
double (DFmode) functions.
My long term thoughts, though it shouldn't affect this patch, are that
we eventually want to represent all x87 math as XFmode operations,
but my guess is that this will be implemented via the RTL/md expanders.
Your approach of disabling the SFmode define_expands fits this well.