public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/28229] New: maybe bug output for sh4a
@ 2006-07-03 2:38 tyokota at k2 dot dion dot ne dot jp
2006-07-03 3:36 ` [Bug target/28229] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: tyokota at k2 dot dion dot ne dot jp @ 2006-07-03 2:38 UTC (permalink / raw)
To: gcc-bugs
test.c
----------------------
int
main () {
char ba[8] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08};
short a[4] = { 0x04, 0x05, 0x06, 0x07};
int c = *((int *)(&a[1]));
int d = *((int *)(&ba[1]));
printf("%08x\n", c );
printf("%08x\n", d );
return 0;
}
-----
sh-elf-linux -m4a -O2 -S test.c
this code maybe cause data address error exception.
movua.l instruction might not have to be output for sh4a.
...
mov.l .L3,r1
add #-16,r15
mov.l .L4,r2
mov r15,r14
movua.l @r1+,r0
mov r14,r3
add #8,r3
mov.l .L5,r9
mov.l r0,@r3
movua.l @r2+,r0
mov r0,r6
mov.l @r1,r0
mov.l r6,@r14
mov r14,r1
mov.l @r2,r6 <--- maybe wrong eliminate movua.l
add #2,r1
mov.l .L6,r8
mov.l r0,@(4,r3)
mov.l r6,@(4,r14)
mov.l @r1,r5
jsr @r9
mov r8,r4
mov r14,r1
add #9,r1
mov.l @r1,r5 <--- maybe cause data address error.
jsr @r9
mov r8,r4
add #16,r14
................
--
Summary: maybe bug output for sh4a
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tyokota at k2 dot dion dot ne dot jp
GCC target triplet: sh-elf-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28229
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug target/28229] maybe bug output for sh4a
2006-07-03 2:38 [Bug target/28229] New: maybe bug output for sh4a tyokota at k2 dot dion dot ne dot jp
@ 2006-07-03 3:36 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-07-03 3:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-07-03 03:36 -------
You are violating the alignment requirement that C depends. If you use -W
-Wall you should get a warning about this.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28229
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-07-03 3:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-03 2:38 [Bug target/28229] New: maybe bug output for sh4a tyokota at k2 dot dion dot ne dot jp
2006-07-03 3:36 ` [Bug target/28229] " 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).