public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/33519] New: Invalid code generated with a combination of thumb, AAPCS and -Os.
@ 2007-09-21 16:29 gcc-bugzilla at gcc dot gnu dot org
2007-09-21 16:32 ` [Bug c/33519] " sami dot kantoluoto at embedtronics dot fi
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2007-09-21 16:29 UTC (permalink / raw)
To: gcc-bugs
GCC generates odd code sequence..
Part of the source (full source in attachment):
usbd_status
usbd_do_request_flags_pipe(usbd_device_handle dev, usbd_pipe_handle pipe,
usb_device_request_t *req, void *data, u_int16_t flags, int *actlen,
u_int32_t timeout)
{
usbd_xfer_handle xfer;
usbd_status err;
xfer = usbd_alloc_xfer(dev);
...
objdump output:
00000000 <usbd_do_request_flags_pipe>:
0: b5f0 push {r4, r5, r6, r7, lr}
2: b089 sub sp, #36
4: 1c14 adds r4, r2, #0
6: 9a0f ldr r2, [sp, #60]
8: 1c1e adds r6, r3, #0
a: 605a str r2, [r3, #4] <-- writes using r3 (data)
c: 9b10 ldr r3, [sp, #64]
e: 9007 str r0, [sp, #28]
10: 609b str r3, [r3, #8]
12: ab0e add r3, sp, #56
14: 9106 str r1, [sp, #24]
16: 881f ldrh r7, [r3, #0]
18: f7ff fffe bl 0 <usbd_alloc_xfer>
And here's objdump output when compiled with the same options but gcc 4.2.1:
00000000 <usbd_do_request_flags_pipe>:
0: b5f0 push {r4, r5, r6, r7, lr}
2: b089 sub sp, #36
4: 1c1e adds r6, r3, #0
6: ab0e add r3, sp, #56
8: 9007 str r0, [sp, #28]
a: 9106 str r1, [sp, #24]
c: 1c14 adds r4, r2, #0
e: 881f ldrh r7, [r3, #0]
10: f7ff fffe bl 0 <usbd_alloc_xfer>
Environment:
System: Linux kivi 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686
GNU/Linux
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: arm-unknown-elf
configured with: /s/devel/gcc-4.1.1/configure --target=arm-elf --with-gnu-as
--with-gcc --with-gnu-ld --enable-languages=c --disable-libstdc
--disable-hosted-libstdcxx --disable-libstdcxx --disable-libstdcxx-v3
--disable-libstdcxx_v3 --disable-nls --disable-shared --disable-threads
--disable-libmudflap --disable-libssp --disable-libgomp --disable-libstdcxx-pch
--prefix=/emb/arm-elf-gcc-4.1.1 --program-prefix=arm-elf- --program-suffix=
--with-newlib -v --without-headers -v
How-To-Repeat:
Compile the test case like:
# arm-elf-gcc -Os -Wall -Werror -mcpu=arm920t -mlittle-endian -mthumb
-mabi=aapcs -c usbdi.c -o usbdi.o
------- Comment #1 from sami dot kantoluoto at embedtronics dot fi 2007-09-21 16:29 -------
Fix:
Work arounds: gcc 4.2.1, optimize for speed instead of size.
--
Summary: Invalid code generated with a combination of thumb,
AAPCS and -Os.
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sami dot kantoluoto at embedtronics dot fi
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: arm-unknown-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33519
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/33519] Invalid code generated with a combination of thumb, AAPCS and -Os.
2007-09-21 16:29 [Bug c/33519] New: Invalid code generated with a combination of thumb, AAPCS and -Os gcc-bugzilla at gcc dot gnu dot org
@ 2007-09-21 16:32 ` sami dot kantoluoto at embedtronics dot fi
2009-04-30 10:39 ` [Bug target/33519] " ramana at gcc dot gnu dot org
2009-12-10 22:58 ` rearnsha at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: sami dot kantoluoto at embedtronics dot fi @ 2007-09-21 16:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from sami dot kantoluoto at embedtronics dot fi 2007-09-21 16:32 -------
Created an attachment (id=14239)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14239&action=view)
Test case
Source code triggering the bug added.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33519
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/33519] Invalid code generated with a combination of thumb, AAPCS and -Os.
2007-09-21 16:29 [Bug c/33519] New: Invalid code generated with a combination of thumb, AAPCS and -Os gcc-bugzilla at gcc dot gnu dot org
2007-09-21 16:32 ` [Bug c/33519] " sami dot kantoluoto at embedtronics dot fi
@ 2009-04-30 10:39 ` ramana at gcc dot gnu dot org
2009-12-10 22:58 ` rearnsha at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-04-30 10:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from ramana at gcc dot gnu dot org 2009-04-30 10:39 -------
We need more information on what the exact problem is with the code generated.
Could you try with a compiler of more recent vintage and report back ?
--
ramana at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33519
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/33519] Invalid code generated with a combination of thumb, AAPCS and -Os.
2007-09-21 16:29 [Bug c/33519] New: Invalid code generated with a combination of thumb, AAPCS and -Os gcc-bugzilla at gcc dot gnu dot org
2007-09-21 16:32 ` [Bug c/33519] " sami dot kantoluoto at embedtronics dot fi
2009-04-30 10:39 ` [Bug target/33519] " ramana at gcc dot gnu dot org
@ 2009-12-10 22:58 ` rearnsha at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2009-12-10 22:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rearnsha at gcc dot gnu dot org 2009-12-10 22:57 -------
No feedback in over 6 months. Closing...
--
rearnsha at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33519
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-12-10 22:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-21 16:29 [Bug c/33519] New: Invalid code generated with a combination of thumb, AAPCS and -Os gcc-bugzilla at gcc dot gnu dot org
2007-09-21 16:32 ` [Bug c/33519] " sami dot kantoluoto at embedtronics dot fi
2009-04-30 10:39 ` [Bug target/33519] " ramana at gcc dot gnu dot org
2009-12-10 22:58 ` rearnsha 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).