------- Comment #1 from ramana at gcc dot gnu dot org 2009-09-16 07:08 ------- The problem occurs with 4.4.x branch r 151319. The problem is evident if you have -march=armv5te or earlier, but not with -march=armv6 or later.
This is the code I get with armv6 foo: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. mov r2, #0 orr r2, r2, r0 mov r0, r2 bx lr Conversely with -mthumb any option less than -march=armv6 gives the following code. foo: @ sp needed for prologue bx lr and a -mcpu=cortex-a8 gives the following code. movs r2, #0 orrs r2, r2, r0 mov r0, r2 bx lr The same problem occurs on trunk. -- ramana at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2009-09-16 07:08:53 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41366