This is the mail archive of the gcc-help@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: Why do floating point operations differ between -m64 -O0/-O1 and -m32 -O0?


On Wed, 24 Nov 2010, Nikos Chantziaras wrote:

Is the FPU hardware still available in x86-64 CPUs

Yes of course, and long double even uses it in the ABI.


On a similar note, is doing floating point computations using SSE faster when compared to the 387?

Yes on modern hardware. But note that moving values between x87 and sse registers can cause some overhead.


It's not that I don't want the excess precision (looks like a Good Thing to me; less rounding errors). It's that I'm not sure if I can count on it being there. Would the above routine be a good enough check to see whether excess precision is there?

If you want the larger precision, use long double. The extra precision for double can randomly disappear anywhere, as soon as the value is moved from a register to memory.


--
Marc Glisse


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