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: [BENCHMARK]-mfpmath=sse should disable x387 intrinsics


On Thu, 25 Nov 2004, Richard Guenther wrote:
> Also, out IP optimization could change the ABI for static functions to
> not have the penalty of returning on the FP stack, testcase (compile
> with -fno-inline -mfpmath=sse):
>
> static double foo(double x)
> {
>   return x*x;
> }
> double bar(double y)
> {
>    y = 2*y+foo(y);
>    return y;
> }

You could try -mno-fp-ret-in-387 which produces much prettier code but
breaks standard ABIs.  Indeed, the 386.c backend could probably be tweaked
to implictly perform the equivalent of "-mno-fp-ret-in-387" when using
"-mfpmath=sse" for static functions within a single compilation unit.
Alternatively, it could also perform the equivalent of a hypothetical
"-mfp-ret-in-sse" in exactly these cases too.

Roger
--


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