This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug optimization/14776] New: -mfpmath=sse causes movapd from non-16-byte aligned address
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: ford at vss dot fsi dot com <gcc-bugzilla at gcc dot gnu dot org>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 30 Mar 2004 16:50:41 +0200
- Subject: Re: [Bug optimization/14776] New: -mfpmath=sse causes movapd from non-16-byte aligned address
- References: <20040329200139.14776.ford@vss.fsi.com>
> gcc -g -O2 -march=pentium4 -mfpmath=sse -c movapd_align_bug.c
>
> objdump -dS movapd_align_bug.o:
>
> xfp->m[0].x = -sin_lon;
> 42: f2 0f 10 05 00 00 00 movsd 0x0,%xmm0
> 49: 00
> 4a: f2 0f 10 4d b0 movsd 0xffffffb0(%ebp),%xmm1
> 4f: 66 0f 29 45 88 movapd %xmm0,0xffffff88(%ebp) <- ILLEGAL
> 54: 66 0f 57 c8 xorpd %xmm0,%xmm1
GCC manages to conclude to spill out the temporary negative zero used to
expand negations and then it hits the usual problem of stack frame being
missaligned in main on cygwin and few other runtimes.
I am quite surprised that register alloc didn't rematerialized the
counstant tought... It is perfect candidate for that.
Honza
> xfp->m[1].x = cos_lon;
> xfp->m[2].x = 0.0;
>
> --
> Summary: -mfpmath=sse causes movapd from non-16-byte aligned
> address
> Product: gcc
> Version: 3.4.0
> Status: UNCONFIRMED
> Severity: normal
> Priority: P2
> Component: optimization
> AssignedTo: unassigned at gcc dot gnu dot org
> ReportedBy: ford at vss dot fsi dot com
> CC: gcc-bugs at gcc dot gnu dot org
> GCC build triplet: i686-pc-cygwin
> GCC host triplet: i686-pc-cygwin
> GCC target triplet: i686-pc-cygwin
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14776