This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/14321] New: gcc emitting "movaps" to unaligned memory
- From: "M dot Drochner at fz-juelich dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Feb 2004 14:54:10 -0000
- Subject: [Bug c/14321] New: gcc emitting "movaps" to unaligned memory
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
In conjunction with "va_start" usage the following code is emitted:
37: 48 8d 0d 2f 00 00 00 lea 47(%rip),%rcx # 6d <_snprintf+0x6d>
3e: 48 29 c1 sub %rax,%rcx
41: 85 f6 test %esi,%esi
43: 48 8d 84 24 1f 03 00 lea 0x31f(%rsp,1),%rax
4a: 00
4b: ff e1 jmpq *%ecx
4d: 0f 29 78 f1 movaps %xmm7,0xfffffffffffffff1(%rax)
51: 0f 29 70 e1 movaps %xmm6,0xffffffffffffffe1(%rax)
55: 0f 29 68 d1 movaps %xmm5,0xffffffffffffffd1(%rax)
59: 0f 29 60 c1 movaps %xmm4,0xffffffffffffffc1(%rax)
5d: 0f 29 58 b1 movaps %xmm3,0xffffffffffffffb1(%rax)
61: 0f 29 50 a1 movaps %xmm2,0xffffffffffffffa1(%rax)
65: 0f 29 48 91 movaps %xmm1,0xffffffffffffff91(%rax)
69: 0f 29 40 81 movaps %xmm0,0xffffffffffffff81(%rax)
6d: 0f 88 24 01 00 00 js 197 <_snprintf+0x197>
The "movaps" needs 16-byte aligned memory locations, which is not
ensured (only 8-byte, appearently). This leads to occasional GPFs,
sepending on the initial stack pointer.
--
Summary: gcc emitting "movaps" to unaligned memory
Product: gcc
Version: 3.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: M dot Drochner at fz-juelich dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: x86_64--netbsd
GCC target triplet: x86_64--netbsd
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14321