public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/14321] New: gcc emitting "movaps" to unaligned memory
@ 2004-02-27 14:54 M dot Drochner at fz-juelich dot de
  2004-02-27 15:24 ` [Bug target/14321] " pinskia at gcc dot gnu dot org
  2004-02-27 20:11 ` M dot Drochner at fz-juelich dot de
  0 siblings, 2 replies; 3+ messages in thread
From: M dot Drochner at fz-juelich dot de @ 2004-02-27 14:54 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/14321] gcc emitting "movaps" to unaligned memory
  2004-02-27 14:54 [Bug c/14321] New: gcc emitting "movaps" to unaligned memory M dot Drochner at fz-juelich dot de
@ 2004-02-27 15:24 ` pinskia at gcc dot gnu dot org
  2004-02-27 20:11 ` M dot Drochner at fz-juelich dot de
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-27 15:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-27 15:23 -------
We need the preprocessed source.  (read http://gcc.gnu.org/bugs.html).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
          Component|c                           |target
           Keywords|                            |wrong-code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14321


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/14321] gcc emitting "movaps" to unaligned memory
  2004-02-27 14:54 [Bug c/14321] New: gcc emitting "movaps" to unaligned memory M dot Drochner at fz-juelich dot de
  2004-02-27 15:24 ` [Bug target/14321] " pinskia at gcc dot gnu dot org
@ 2004-02-27 20:11 ` M dot Drochner at fz-juelich dot de
  1 sibling, 0 replies; 3+ messages in thread
From: M dot Drochner at fz-juelich dot de @ 2004-02-27 20:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From M dot Drochner at fz-juelich dot de  2004-02-27 20:11 -------
I can't reproduce the problem with a simple non-threaded program.
Appearently, the problem is the thread library not enforcing the
16-byte sp alignment requirement of the ELF ABI.
Sorry for the noise.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14321


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-02-27 20:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-27 14:54 [Bug c/14321] New: gcc emitting "movaps" to unaligned memory M dot Drochner at fz-juelich dot de
2004-02-27 15:24 ` [Bug target/14321] " pinskia at gcc dot gnu dot org
2004-02-27 20:11 ` M dot Drochner at fz-juelich dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).