This is the mail archive of the gcc@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: Omitted conversion float -> double in x86 back-end



On Nov 21, 2006, at 12:50, Michael Matz wrote:
Pure luck. Try with -O2 or another compiler version and it will stop
working again. IOW: it's no workaround for the x87 problem. The only one
there is is -ffloat-store, and that is a performance sink. Rule of thumb:
don't use x87 math.

There's no problem with x87 math as long as you're using long double. Convert to float when/if you need to by forcing writes to memory, either by using volatile variables or other means. For float there is no loss of precision due to double rounding.

Fortunately, on newer machines there is -mfpmath=sse which solves
this issue.

-Geert


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