This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/19653] New: 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: 27 Jan 2005 08:34:02 -0000
- Subject: [Bug target/19653] New: x87 reg allocated for constants for -mfpmath=sse
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
A self-contained testcase is attached to this bugreport. Please compile it with
-O2 -march=pentium4 -mfpmath=sse -ffast-math.
This part of the testcase:
...
if ( fabs(fabs(NewRay->Direction[Z])- 1.) < .1 ) {
/* too close to vertical for comfort, so use cross product with horizon */
up[X] = 0.; up[Y] = 1.; up[Z] = 0.;
}
else
{
up[X] = 0.; up[Y] = 0.; up[Z] = 1.;
}
VCross(n2, NewRay->Direction, up); VNormalizeEq(n2);
VCross(n3, NewRay->Direction, n2); VNormalizeEq(n3);
...
will generate:
jae .L2
fldz
fstl -112(%ebp)
movsd -112(%ebp), %xmm2
fld1
fstpl -112(%ebp)
movsd -112(%ebp), %xmm1
.L5:
fldl 32(%ebx)
fstpl -96(%ebp)
movsd -96(%ebp), %xmm3
mulsd %xmm2, %xmm3
movapd %xmm5, %xmm0
mulsd %xmm1, %xmm0
subsd %xmm0, %xmm3
fldl 24(%ebx)
fstpl -88(%ebp)
mulsd -88(%ebp), %xmm2
xorpd .LC5, %xmm2
movsd -88(%ebp), %xmm4
...
.L2:
fld1
fstpl -112(%ebp)
movsd -112(%ebp), %xmm2
fldz
fstl -112(%ebp)
movsd -112(%ebp), %xmm1
jmp .L5
Uros.
--
Summary: x87 reg allocated for constants for -mfpmath=sse
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: uros at kss-loka dot si
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19653