Re: [Gc] Patch: fix libatomic-ops on ARM Thumb-2

Ivan Maidanski ivmai at mail.ru
Tue Nov 23 12:19:05 PST 2010


Hi, Michael!

Thanks for reporting it. Fixed (also for armcc).

Tue, 23 Nov 2010 13:24:08 +1300 Michael Hope <michael.hope at linaro.org>:

> Hi there.  The attached patch fixes building libatomic-ops for ARM in
> Thumb-2 mode.  The atomic ARMv6 operations use a 'strexeq' (store
> exclusive if equal) instruction which needs a corresponding 'it eq'
> just before it.
> 
> Note that the patch has no effect on ARM mode - the assembler will
> validate and then drop the IT instruction.
> 
> The original build failure was:
> 
> ---
> ...
> gcc -DHAVE_CONFIG_H -I.    -fPIC -g -O2 -DNDEBUG -MT
> atomic_ops_stack.o -MD -MP -MF .deps/atomic_ops_stack.Tpo -c -o
> atomic_ops_stack.o atomic_ops_stack.c
> /tmp/cc8JTTQ3.s: Assembler messages:
> /tmp/cc8JTTQ3.s:74: Error: thumb conditional instruction should be in
> IT block -- `strexeq r4,r1,[r2]'
> make[3]: *** [atomic_ops_stack.o] Error 1
> ---
> 
> which was seen on Ubuntu Maverick with binutils
> 2.20.51-system.20100908 and Linaro GCC 4.5.  Note that you won't see
> the problem under Ubuntu with GCC 4.4 due to the -mimplicit-it flag.
> 
> -- Michael



More information about the Gc mailing list