ARM4, ARMI & THUMB
From Nokia Developer Wiki
Created:(30 Jun 2007)
Last edited:(30 Jul 2012)
Current ARM processors (at least ARM7 and ARM9) have two instruction sets:
- One has instructions on 32 bits which is ARM4.
- The other is 16 bits instructions which is THUMB.
- ARM4 mode has a slightly richer instruction set. THUMB mode is more compact. A general rule is that program compiled in THUMB mode are smaller than program compiled in ARM4 mode. And program compiled in ARM4 are faster.
- However, this may not be true for all mobiles, depending on their hardware architecture. As a matter of fact, most mobile phones have a 16 bit memory bus, and then use THUMB mode. In that particular case, a THUMB mode program is generally smaller and quicker because one memory access is enough to fetch an instruction.
- ARMI stands for ARM Intermediate. This is the safest choice to use since ARMI program can be linked with THUMB or ARM4 libraries while THUMB compiled code can only be linked with THUMB code and ARM4 code with ARM4 code.