This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/19653] x87 reg allocated for constants for -mfpmath=sse
- From: "uros at kss-loka dot si" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jan 2005 06:23:56 -0000
- Subject: [Bug target/19653] x87 reg allocated for constants for -mfpmath=sse
- References: <20050127083359.19653.uros@kss-loka.si>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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