Port-amd64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: i387 rounding mode and long double support



On Sat, Jul 23, 2011 at 12:00:24AM +0200, Matthias Drochner wrote:
> 
> joerg%britannica.bec.de@localhost said:
> > If GCC really wants to use the i387, it certainly has to pay the price.
> > Either setting the rounding mode in a function or forcing loads/stores
> > are options for that
> 
> To state the obvious: it is not gcc what pays the price but the program
> built, or its user.
> Some simple checks show that gcc-4.5 and clang indeed prefer sse2 math
> to x87 for an amd64 target. Didn't check pcc.

If it is using x87 instead of SSE2 it is already not caring about
performance. There are only two reasons why SSE2 is not the recommented
backend on i386 -- not everything has it and the calling convention
requires the use of the x87 stack. Both vanish on AMD64.

> As said, if one can rely on the compiler to avoid the x87 then a change
> of the default rounding mode wouldn't harm.

So it boils down to: Do we care about compilers with lame code
generation?

Joerg


Home | Main Index | Thread Index | Old Index