--- Comment #6 from sliao at google dot com 2010-01-07 09:18 ---
For the trunk snapshot of 20100102, GCC 4.5.0 indeed removes most of the
redundancy. However, -O1 and -Os still produce an extra instruction, while -O2
doesn't. Do we care about an extra instruction below? Thanks
--- Comment #2 from sliao at google dot com 2010-01-07 11:31 ---
1. Yes, the flags used are -mthumb -Os -march=armv5te.
2. For completeness, I also tried to generate 32-bit instructions. In this case
of ARM mode, GCC 4.5.0 (trunk as of last week) didn't store things onto stack
--- Comment #3 from sliao at google dot com 2010-01-07 12:43 ---
Because:
This bug can be more easily demonstrated with multiplication of tv_sec by 10
and tv_usec/ 1000 removed
, the input program is:
#include sys/time.h
extern void get_time(struct timeval*);
void test(long long *res
--- Comment #4 from sliao at google dot com 2010-01-07 12:55 ---
Compilation flags: -march=armv5te -mthumb -Os
gcc.4.2.1: (code size 0x1e bytes)
push {r4, lr}
sub sp, #8
adds r4, r0, #0
mov r0, sp
bl 0 get_time
ldr r2, [sp, #0]
add sp, #8
lsls r3, r2, #2
adds r3, r3, r2
lsls
--- Comment #2 from sliao at google dot com 2010-01-07 13:28 ---
Using flags, -march=armv5te -mthumb -Os, GCC 4.5.0 (trunk) generates the
following code:
test:
0:b570 push{r4, r5, r6, lr}
2:b084 subsp, #16
4:1c05 adds
--- Comment #3 from sliao at google dot com 2010-01-08 00:29 ---
Yes, I generated the code from the trunk and got the same code as Ramana got,
except for the last line below. (Sorry that I filed this bug right before the
Christmas flight and couldn't check the trunk at that time.)
815c
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sliao at google dot com
GCC build triplet: i686-linux
GCC host triplet: i686-linux
GCC target triplet: arm-eabi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42574
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sliao at google dot com
GCC build triplet: i686-linux
GCC host triplet: i686-linux
GCC target triplet: arm-eabi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42575
by
constant
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sliao at google dot com
GCC build triplet: i686
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sliao at google dot com
GCC build triplet: i686-linux
GCC host triplet: i686-linux
GCC target triplet: arm-eabi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42501
ReportedBy: sliao at google dot com
GCC build triplet: i686-linux
GCC host triplet: i686-linux
GCC target triplet: arm-eabi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42502
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sliao at google dot com
GCC build triplet: i686-linux
GCC host triplet
at gcc dot gnu dot org
ReportedBy: sliao at google dot com
GCC build triplet: i686-linux
GCC host triplet: i686-linux
GCC target triplet: arm-eabi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42494
Severity: normal
Priority: P3
Component: testsuite
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sliao at google dot com
GCC build triplet: i686-linux-gnu
GCC host triplet: i686-linux-gnu
GCC target triplet: arm-unknown-eabi
http
14 matches
Mail list logo