------- Comment #2 from mirq-gccboogs at rere dot qmqm dot pl 2010-03-23 14:37
-------
Sorry, I try to split encountered problems into simple testcases and after a
few I forgot to add the common things to bugreports.
The difference between ma() and mb() in the example is a global's size:
ma():
- unsigned short global, generates two insns for the operation:
ldrh r2, [r3, #0]
mvn r2, r2, asl #18
mvn r2, r2, lsr #18
strh r2, [r3, #0] @ movhi
mb():
- unsigned int global, generates one insn for the same operation:
ldr r2, [r3, #0]
orr r2, r2, #49152
str r2, [r3, #0]
'u' and 'd' are compile time constants.
compiled with:
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -O3 -S a.c
$ LANG=C arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=/usr/src/gcc-armtest/bin/arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/src/gcc-armtest/libexec/gcc/arm-none-eabi/4.5.0/lto-wrapper
Target: arm-none-eabi
Configured with: ../gcc-combined/configure --with-newlib
--prefix=/usr/src/gcc-armtest --target arm-none-eabi --enable-languages=c
--disable-libssp
Thread model: single
gcc version 4.5.0 20100319 (experimental) (GCC)
$ LANG=C svn info
Path: .
URL: svn://gcc.gnu.org/svn/gcc/trunk
Repository Root: svn://gcc.gnu.org/svn/gcc
Repository UUID: 138bc75d-0d04-0410-961f-82ee72b054a4
Revision: 157582
Node Kind: directory
Schedule: normal
Last Changed Author: bernds
Last Changed Rev: 157582
Last Changed Date: 2010-03-19 19:41:22 +0100 (Fri, 19 Mar 2010)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43473