public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/49168] New: [4.7 Regression] Aligned store used with unaligned address
@ 2011-05-25 21:40 hjl.tools at gmail dot com
2011-05-26 8:21 ` [Bug middle-end/49168] " rguenther at suse dot de
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2011-05-25 21:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49168
Summary: [4.7 Regression] Aligned store used with unaligned
address
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hjl.tools@gmail.com
CC: rguenth@gcc.gnu.org
On Linux/x86-64, revision 174223 gave
[hjl@gnu-6 gcc]$ cat /tmp/x.c
#include <stdarg.h>
void
flt128_va (void *mem, va_list *ap)
{
__float128 d = va_arg (*ap, __float128);
__builtin_memcpy (mem, &d, sizeof (d));
}
[hjl@gnu-6 gcc]$ ./xgcc -B./ -O2 -S /tmp/x.c
[hjl@gnu-6 gcc]$ cat x.s
.file "x.c"
.text
.p2align 4,,15
.globl flt128_va
.type flt128_va, @function
flt128_va:
.LFB0:
.cfi_startproc
movl 4(%rsi), %edx
cmpl $176, %edx
jb .L5
movq 8(%rsi), %rax
addq $15, %rax
andq $-16, %rax
leaq 16(%rax), %rdx
movq %rdx, 8(%rsi)
movdqa (%rax), %xmm0
movdqa %xmm0, (%rdi)
ret
.p2align 4,,10
.p2align 3
.L5:
mov %edx, %eax
addq 16(%rsi), %rax
addl $16, %edx
movl %edx, 4(%rsi)
movdqa (%rax), %xmm0
movdqa %xmm0, (%rdi)
ret
.cfi_endproc
.LFE0:
.size flt128_va, .-flt128_va
It may be caused by revision 174206:
http://gcc.gnu.org/ml/gcc-cvs/2011-05/msg00987.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/49168] [4.7 Regression] Aligned store used with unaligned address
2011-05-25 21:40 [Bug middle-end/49168] New: [4.7 Regression] Aligned store used with unaligned address hjl.tools at gmail dot com
@ 2011-05-26 8:21 ` rguenther at suse dot de
2011-05-26 8:22 ` [Bug target/49168] " rguenth at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenther at suse dot de @ 2011-05-26 8:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49168
--- Comment #1 from rguenther at suse dot de <rguenther at suse dot de> 2011-05-26 07:58:45 UTC ---
On Wed, 25 May 2011, hjl.tools at gmail dot com wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49168
>
> Summary: [4.7 Regression] Aligned store used with unaligned
> address
> Product: gcc
> Version: 4.7.0
> Status: UNCONFIRMED
> Severity: normal
> Priority: P3
> Component: middle-end
> AssignedTo: unassigned@gcc.gnu.org
> ReportedBy: hjl.tools@gmail.com
> CC: rguenth@gcc.gnu.org
>
>
> On Linux/x86-64, revision 174223 gave
>
> [hjl@gnu-6 gcc]$ cat /tmp/x.c
> #include <stdarg.h>
>
> void
> flt128_va (void *mem, va_list *ap)
> {
> __float128 d = va_arg (*ap, __float128);
> __builtin_memcpy (mem, &d, sizeof (d));
> }
> [hjl@gnu-6 gcc]$ ./xgcc -B./ -O2 -S /tmp/x.c
> [hjl@gnu-6 gcc]$ cat x.s
> .file "x.c"
> .text
> .p2align 4,,15
> .globl flt128_va
> .type flt128_va, @function
> flt128_va:
> .LFB0:
> .cfi_startproc
> movl 4(%rsi), %edx
> cmpl $176, %edx
> jb .L5
> movq 8(%rsi), %rax
> addq $15, %rax
> andq $-16, %rax
> leaq 16(%rax), %rdx
> movq %rdx, 8(%rsi)
> movdqa (%rax), %xmm0
> movdqa %xmm0, (%rdi)
> ret
> .p2align 4,,10
> .p2align 3
> .L5:
> mov %edx, %eax
> addq 16(%rsi), %rax
> addl $16, %edx
> movl %edx, 4(%rsi)
> movdqa (%rax), %xmm0
> movdqa %xmm0, (%rdi)
> ret
> .cfi_endproc
> .LFE0:
> .size flt128_va, .-flt128_va
>
> It may be caused by revision 174206:
>
> http://gcc.gnu.org/ml/gcc-cvs/2011-05/msg00987.html
If __float128 needs alignment then it needs to be handled
via movmisalign_optab on non-strict-align targets.
Richard.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/49168] [4.7 Regression] Aligned store used with unaligned address
2011-05-25 21:40 [Bug middle-end/49168] New: [4.7 Regression] Aligned store used with unaligned address hjl.tools at gmail dot com
2011-05-26 8:21 ` [Bug middle-end/49168] " rguenther at suse dot de
@ 2011-05-26 8:22 ` rguenth at gcc dot gnu.org
2011-05-26 14:21 ` hjl.tools at gmail dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-05-26 8:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49168
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |x86_64-*-*, i?86-*-*
Component|middle-end |target
Target Milestone|--- |4.7.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/49168] [4.7 Regression] Aligned store used with unaligned address
2011-05-25 21:40 [Bug middle-end/49168] New: [4.7 Regression] Aligned store used with unaligned address hjl.tools at gmail dot com
2011-05-26 8:21 ` [Bug middle-end/49168] " rguenther at suse dot de
2011-05-26 8:22 ` [Bug target/49168] " rguenth at gcc dot gnu.org
@ 2011-05-26 14:21 ` hjl.tools at gmail dot com
2011-05-26 17:42 ` hjl.tools at gmail dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2011-05-26 14:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49168
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ubizjak at gmail dot com
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2011-05-26 14:06:21 UTC ---
[hjl@gnu-6 pr49168]$ cat x.c
void
flt128_va (void *mem, __float128 d)
{
__builtin_memcpy (mem, &d, sizeof (d));
}
[hjl@gnu-6 pr49168]$ make x.s
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -S -o x.s -O2 x.c
[hjl@gnu-6 pr49168]$ cat x.s
.file "x.c"
.text
.p2align 4,,15
.globl flt128_va
.type flt128_va, @function
flt128_va:
.LFB0:
.cfi_startproc
movdqa %xmm0, (%rdi)
ret
.cfi_endproc
.LFE0:
.size flt128_va, .-flt128_va
.ident "GCC: (GNU) 4.7.0 20110526 (experimental)"
.section .note.GNU-stack,"",@progbits
[hjl@gnu-6 pr49168]$
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/49168] [4.7 Regression] Aligned store used with unaligned address
2011-05-25 21:40 [Bug middle-end/49168] New: [4.7 Regression] Aligned store used with unaligned address hjl.tools at gmail dot com
` (2 preceding siblings ...)
2011-05-26 14:21 ` hjl.tools at gmail dot com
@ 2011-05-26 17:42 ` hjl.tools at gmail dot com
2011-05-30 20:10 ` hjl at gcc dot gnu.org
2011-06-08 5:27 ` hjl.tools at gmail dot com
5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2011-05-26 17:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49168
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-p
| |atches/2011-05/msg02067.htm
| |l
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2011-05-26 17:36:46 UTC ---
A patch is posted at
http://gcc.gnu.org/ml/gcc-patches/2011-05/msg02067.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/49168] [4.7 Regression] Aligned store used with unaligned address
2011-05-25 21:40 [Bug middle-end/49168] New: [4.7 Regression] Aligned store used with unaligned address hjl.tools at gmail dot com
` (3 preceding siblings ...)
2011-05-26 17:42 ` hjl.tools at gmail dot com
@ 2011-05-30 20:10 ` hjl at gcc dot gnu.org
2011-06-08 5:27 ` hjl.tools at gmail dot com
5 siblings, 0 replies; 7+ messages in thread
From: hjl at gcc dot gnu.org @ 2011-05-30 20:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49168
--- Comment #4 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2011-05-30 20:00:16 UTC ---
Author: hjl
Date: Mon May 30 20:00:11 2011
New Revision: 174451
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174451
Log:
Handle misaligned TFmode load/store.
gcc/
2011-05-30 H.J. Lu <hongjiu.lu@intel.com>
PR target/49168
* config/i386/i386.md (*movtf_internal): Handle misaligned
load/store.
gcc/testsuite/
2011-05-30 H.J. Lu <hongjiu.lu@intel.com>
PR target/49168
* gcc.target/i386/pr49168-1.c: New.
Added:
trunk/gcc/testsuite/gcc.target/i386/pr49168-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.md
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/49168] [4.7 Regression] Aligned store used with unaligned address
2011-05-25 21:40 [Bug middle-end/49168] New: [4.7 Regression] Aligned store used with unaligned address hjl.tools at gmail dot com
` (4 preceding siblings ...)
2011-05-30 20:10 ` hjl at gcc dot gnu.org
@ 2011-06-08 5:27 ` hjl.tools at gmail dot com
5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2011-06-08 5:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49168
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> 2011-06-08 05:26:51 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-06-08 5:27 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-25 21:40 [Bug middle-end/49168] New: [4.7 Regression] Aligned store used with unaligned address hjl.tools at gmail dot com
2011-05-26 8:21 ` [Bug middle-end/49168] " rguenther at suse dot de
2011-05-26 8:22 ` [Bug target/49168] " rguenth at gcc dot gnu.org
2011-05-26 14:21 ` hjl.tools at gmail dot com
2011-05-26 17:42 ` hjl.tools at gmail dot com
2011-05-30 20:10 ` hjl at gcc dot gnu.org
2011-06-08 5:27 ` hjl.tools at gmail dot com
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).