This is the mail archive of the
mailing list for the GCC project.
Re: -mfpmath=sse -mno-80387 troubles
Just a note - do not use -mno-80387 if you are calling external math
functions. This option now implies -mno-fp-ret-in-387 and it will
introduce an ABI mismatch. The goal is that -mfpmath=sse should be
enough to prevent unnecessary x87 code.
In latest CVS, these problems should be fixed. Please try to compileOk, will do tomorrow.
your code with the latest CVS gcc, and if it still crashes, please file
a bugreport. If you spot an x87 constant, please add a testcase to
PR19653. However ...
BTW: I don't think that x87 should be fully disabled for -mfpmath=sse.
st(0) can be used as a temporary storage for memory-to-memory transfers.
Also, it can do on-the-fly FP extending and truncating, without touching
a SSE reg:
movsd (%eax),xmm1 # ~7 cycles
cvtsd2ss xmm1,(%esp) # 14 cycles
could be implemented by:
fldl (%eax) # ~7cycles
fstps (%esp) # ~7cycles
There is nothing wrong, if fldl is replaced with fldz or fld1. The
performance problems will arise in case when memory location is used in
subsequent SSE computations. In this case, it would be better if zero is
"generated" in SSE register and stored to memory from SSE reg.