[Bug target/19653] x87 reg allocated for constants for -mfpmath=sse

uros at kss-loka dot si gcc-bugzilla@gcc.gnu.org
Fri Jan 28 06:24:00 GMT 2005


------- Additional Comments From uros at kss-loka dot si  2005-01-28 06:23 -------
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.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19653



More information about the Gcc-bugs mailing list