This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Silly question about ARM thumb
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Øyvind Harboe <oyvind dot harboe at zylin dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Tue, 22 Feb 2005 06:32:34 -0700
- Subject: Re: [ECOS] Silly question about ARM thumb
- Organization: MLB Associates
- References: <1109078758.3866.7.camel@localhost.localdomain>
On Tue, 2005-02-22 at 14:25 +0100, Øyvind Harboe wrote:
> If the code is smaller and faster, why aren't all ARM programs compiled
> w/ARM thumb?
>
> Tell me about the downside, I can live with the upside :-)
>
> I'm pretty happy with code-size on the Atmel EB40a, so I'm a bit
> averse to changing things.
>
> This posting quotes 20% code size decrease and 50% speed increase.
>
> http://sourceware.org/ml/ecos-discuss/2002-11/msg00036.html
In general, I'm not sure about the speed up. The biggest shortcoming
I can think of is that THUMB mode is pretty restrictive - it has serious
limits on addressing and program size. Also fewer available registers
(although few compilers make stellar use of all the existing ARM
registers) Finally, I think that on a system with 32 bit wide memory
that has no cache, THUMB would suffer some performance hits as all
instruction accesses are 16 bit only, so a lot of memory bandwidth
would just get wasted.
Just my 2c - THUMB mode is interesting, but I see it being useful
in only a small set of circumstances.
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss