March 11, 2017

The difference between ARM and Thumb mode of ARM(Advanced RISC Machines) processor

□ ARM mode

○ ARM mode is status that the T bit of CPSR(Current Program Status Register) is 0
○ ARM mode provides 32 bit instruction set
○ ARM mode fetchs instructions by 4 bytes
□ ARM 모드
○ CPSR(Current Program Status Register)의 T bit가 0이면 ARM mode
○ 32비트 명령어 세트를 제공
○ 4 byte씩 명령어를 fetch

□ Thumb mode
○ Thumb mode is status that the T bit of CPSR(Current Program Status Register) is 1
○ Thumb mode provides 16 bit instruction set
○ Thumb mode fetchs instructions by 2 bytes
○ ARM processor including T at the name supports Thumb mode(Ex. ARM7TDMI)
□ Thumb 모드
○ CPSR(Current Program Status Register)의 T bit가 1이면 Thumb mode
○ 16비트 인스트럭션 셋을 제공
○ 2 byte씩 명령어를 fetch
○ 프로세서 이름에 T가 들어있는 제품은 Thumb 모드를 지원(Ex. ARM7TDMI)

※ Inputting an odd address in the BX instruction sets the T bit in CPSR to 1(even address make it 0)
※ BX(Branch And Exchange) 명령어에 홀수 주소를 입력하면 CPSR의 T bit가 1로 설정된다(짝수는 0).