[uClibc] Bug 385, add Thumb support to ARM
Mike Frysinger
vapier at gentoo.org
Fri Aug 19 00:53:42 UTC 2005
On Thursday 18 August 2005 07:55 pm, John Bowler wrote:
> From: Mike Frysinger [mailto:vapier at gentoo.org]
> >any suggestions for cheap thumb hardware i could pick up to help test ? i
> >currently have 3 diff arm machines, but i'm not sure how well thumb is
> >supported on them ...
> >netwinders: little endian strong arm 110, pretty sure it doesnt support
> >thumb
>
> According to gcc/config/arm.h this is __ARM_ARCH_4__, not 4T, so has no
> thumb instructions. Anyway, supporting 4T is a lot of work because the
> instruction 'ldr pc,[rx]' does not switch the instruction set according to
> the low bit of [rx]. Fixing that is an annoyingly large number of changes
> to the existing assembler code.
yeah, i was confused at first because i thought you were talking about armv4,
not armv4t ... considering the crap we'd have to deal with in order to get 4T
to work, your proposed solutions sound best
> >nslu2: big endian XScale-IXP425 ... i think this is 5T right ?
>
> Yes, works fine with my current system for simple thumb executables. I
> haven't made progress with the problems I encountered with thumb uclibc yet
> because I'm blocked by a totally unrelated problem.
good, i guess i dont need to buy more hardware right now then :)
> A lot of the annoyance in this stuff is that the current GNU tools still
> try to deal with the 4T issues - they don't use BLX when calling a
> function, instead they use BL (which does not change mode) to a stub
> inserted by the linker and they don't use LDR pc, instead they insert a
> call to _call_via_rx.
on the topic of the toolchain, it seemed odd to add a bunch of
defined(__thumb__) checks to the code ... does that mean if you compile for
thumb targets the __arm__ preprocessor is not defined ?
going back to the question i posed on the bug, it seems like a good idea to me
if we add a new config option to Target Architecture Features and Options for
arm targets:
[ ] Compile code using thumb
i know you can easily override CC with automated build systems such as OE, but
not everyone uses automated build systems ;)
-mike
More information about the uClibc
mailing list