Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: W(or not) to use ARM mode

2005-07-20 by Peter

> 
> lp fan's comments are pretty much in agreement with what I have 
> observed, but I can't help stir the pot some:
> 

Ditto on the pot-stirring, I do agree with the memory-width benefits 
of Thumb code that have been raised, but I wanted to mention that 
there is another factor to consider.

Thumb instructions have very limited access to registers outside the 
R0-R7 range, so for larger functions with lots of local variables 
you may find that ARM code causes fewer spills out to the stack - 
memory reads/writes are 2 and 3 times slower on ARM than data-
processing instructions even from zero waitstate memory, and the 
condition flags are not set by a load, potentially adding an extra 
instruction for testing the value loaded.

The quality of the compiler will make a huge difference in the 
relative merits of ARM and Thumb in this respect. I noticed that the 
allocation of variables to registers, and register reuse can be 
truly appalling in the gnu compiler, compared to the ARM compiler, 
but I will qualify that by saying that I'm sure gnu has improved 
over the past 18 months.

Peter.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.