http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38644
--- Comment #54 from Sebastian Huber <sebastian.hu...@embedded-brains.de> 2011-10-28 07:31:19 UTC --- I tested with GCC 4.6.2 and the patch provided by Mikael Pettersson. It works for -march=armv4t and -march=armv5t, but not for -march=armv5te: --- test-armv5te.s 2011-10-28 09:22:24.627388063 +0200 +++ test-armv5t.s 2011-10-28 09:22:19.923643155 +0200 @@ -1,4 +1,4 @@ - .arch armv5te + .arch armv5t .fpu softvfp .eabi_attribute 20, 1 .eabi_attribute 21, 1 @@ -27,8 +27,8 @@ mov r1, r4 mov r2, #1 bl doStreamReadBlock - add sp, sp, #8 ldrb r0, [r4] + add sp, sp, #8 @ sp needed for prologue pop {r4, pc} .size readStream, .-readStream Command line: arm-eabi-gcc -O2 -march=armv5t -mthumb -S test.c -o test-armv5t.s arm-eabi-gcc -O2 -march=armv5te -mthumb -S test.c -o test-armv5te.s