public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/16491] New: Unaligned accesses broken on ppc64
@ 2004-07-12 11:45 jakub at gcc dot gnu dot org
2004-07-12 14:28 ` [Bug target/16491] " pinskia at gcc dot gnu dot org
2004-07-12 14:33 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: jakub at gcc dot gnu dot org @ 2004-07-12 11:45 UTC (permalink / raw)
To: gcc-bugs
struct __attribute__((packed)) G { unsigned char i; unsigned long l; };
unsigned long
foo (struct G x)
{
return x.l;
}
fails to compile at -O1 and higher.
e.c: In function `foo':
e.c:6: error: insn does not satisfy its constraints:
(insn:HI 24 33 27 0 (set (reg/i:DI 3 3 [ <result> ])
(mem/s:DI (plus:DI (reg:DI 9 9)
(const_int 49 [0x31])) [4 x.l+0 S8 A8])) 326 {*movdi_internal64}
(insn_list 7 (insn_list 8 (nil)))
(nil))
e.c:6: internal compiler error: in reload_cse_simplify_operands, at
postreload.c:378
This was fixed for 3.4 with PR rtl-optimization/13674 patch.
For this testcase though, -fnew-ra doesn't help at all.
ppc64 doesn't have STRICT_ALIGNMENT != 0 (unless -fstrict-align, but that fixes
the testcase), so I don't see how movdi_internal64 insn can refuse to handle
non-aligned loads. SLOW_UNALIGNED_ACCESS will handle most of the cases by doing
the load in pieces, but that still doesn't mean such instructions can't be
generated.
--
Summary: Unaligned accesses broken on ppc64
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: powerpc64-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16491
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/16491] Unaligned accesses broken on ppc64
2004-07-12 11:45 [Bug target/16491] New: Unaligned accesses broken on ppc64 jakub at gcc dot gnu dot org
@ 2004-07-12 14:28 ` pinskia at gcc dot gnu dot org
2004-07-12 14:33 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-12 14:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-12 14:28 -------
*** Bug 16493 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16491
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/16491] Unaligned accesses broken on ppc64
2004-07-12 11:45 [Bug target/16491] New: Unaligned accesses broken on ppc64 jakub at gcc dot gnu dot org
2004-07-12 14:28 ` [Bug target/16491] " pinskia at gcc dot gnu dot org
@ 2004-07-12 14:33 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-12 14:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-12 14:33 -------
This is basically a dup of bug 13674 anyways, if Geoff would just approve the patch this problem
would go away.
The reason why movdi_internal64 refuses to do non unaligned loads is because the ld instruction
needs a 4byte aligned offset which is different from what STRICT_ALIGNMENT and
SLOW_UNALIGNED_ACCESS will provide and it would just make it slower.
*** This bug has been marked as a duplicate of 13674 ***
*** This bug has been marked as a duplicate of 13674 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16491
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-07-12 14:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-12 11:45 [Bug target/16491] New: Unaligned accesses broken on ppc64 jakub at gcc dot gnu dot org
2004-07-12 14:28 ` [Bug target/16491] " pinskia at gcc dot gnu dot org
2004-07-12 14:33 ` pinskia at gcc dot gnu dot org
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).