Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: thumb compilation



On Wed, 2008-04-30 at 11:49 +0300, Mikko Rapeli wrote:
> Hello,
> 
> While looking for ways to reduce user space and libc size (
> http://wiki.netbsd.se/How_to_reduce_libc_size ), I tried
> compiling them with CPUFLAGS=-mthumb\ -mthumb-interwork, but this
> results in libc build failure in
> common/lib/libc/atomic/atomic_init_testset.c:
> 
> --- atomic_init_testset.o ---
> /tmp/ccrqRNVc.s: Assembler messages:
> /tmp/ccrqRNVc.s:126: Error: bad instruction `swp r0,r3,[r2]'
> *** [atomic_init_testset.o] Error code 1
> 
> Is this a compiler bug and are there some known workarounds?
> 
> Thanks,
> -Mikko

The compiler never directly generates SWP, so this must be an in-line
assembler statement.  Since there's no SWP instruction in Thumb, the
code that generates this will need reworking to push the required
instructions out-of-line.

R.
-- 
Richard Earnshaw             Email: Richard.Earnshaw%arm.com@localhost
ARM Ltd                      Phone: +44 1223 400569 (Direct + VoiceMail)
110 Fulbourn Road            Switchboard: +44 1223 400400
Cherry Hinton                Fax: +44 1223 400410
Cambridge CB1 9NJ            Web: http://www.arm.com/
UK



Home | Main Index | Thread Index | Old Index