Saturday, 21 December 2013

INTRODUCTION TO ARM AND THUMB MODE

INTRODUCTION TO ARM & THUMB MODE :

ARM MODE: Always executed in the 32 bit data format, word-aligned ARM instructions. The ARM Instruction Set is selected after CPU reset or an interrupt. The data or the opcode are accessed as 32 bit data.
ARM mode is executed for all the modes available in 6 modes except USER mode.
The execution is always faster and is always seen in privileged mode.

Thumb mode: Always executed in User mode and is always executed by accessing the data and code in the 16 bit format and are half word-aligned. Always seen in unprivileged mode.
Execution is slower compared to ARM mode.

This is of great importance as the main feature of the Thumb, increasing the code density. Code density is much more efficient and is 65% more compared to ARM mode.
The registers in the THUMB mode differs slightly compared to ARM mode.

• Instruction word length shrunk to 16-bits
• Instructions follow their own syntax but each instruction has its native ARM instruction counterpart
• Due to shrinking some functionality is lost
• 19 different Thumb instruction formats


WHEN THE USER CODE IS COMPILED AND HEX FILE IS GENERATED ONE CAN OBSERVE THAT THE OPCODES GENERATED FOR “THUMB” AND FOR “ARM” ARE ENTIRELY DIFFERENT.

0 comments:

Post a Comment