This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/19009] Loading of FP constants into FP reg via SSE reg
- 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: 16 Dec 2004 13:50:31 -0000
- Subject: [Bug target/19009] Loading of FP constants into FP reg via SSE reg
- References: <20041215121502.19009.uros@kss-loka.si>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From uros at kss-loka dot si 2004-12-16 13:50 -------
-finline-functions is needed to trigger the bug with -O2.
The attached testcase should be compiled with '-O2 -march=pentium4 -mfpmath=387
-ffast-math -D__NO_MATH_INLINES -finline-functions' to get:
...
pxor %xmm0, %xmm0
movsd %xmm0, -16(%ebp)
fldl -16(%ebp)
fcomip %st(1), %st
je .L23
fld %st(0)
...
and:
grep xmm zero.s
pxor %xmm0, %xmm0
movsd %xmm0, -16(%ebp)
movsd %xmm0, -16(%ebp)
movsd %xmm0, -16(%ebp)
movsd %xmm0, -16(%ebp)
movsd %xmm0, 8(%edx)
movsd %xmm0, (%edx)
where movsds are followed by:
fldl -16(%ebp)
BTW: "#include <math.h> can be removed from testcase to avoid
-D__NO_MATH_INLINES. Ther result will be the same.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19009