ARM architecture and system learning (iii) -- ARM processor status

Source: Internet
Author: User

There are two arm instruction sets and thumb instruction sets.

The arm instruction set is 32-bit long and has the most complete functions. The thumb instruction set is 16-bit long and can implement most of the functions of the arm instruction set.

Thumb instruction set is extremely highCodeDensity (reduced by 30% on average ).

The ARM processor has two processor states that correspond to the two sets of instruction sets respectively.

ToProgramThe control bit t in the Status Register CPSR reflects the state in which the processor is operating, that is, which instruction set is being executed. When T = 0, the processor is in the arm State and executes the arm command. When T = 1, the processor is in the thumb state and executes the thumb command. The processor is in the arm State by default when the system is powered on.

Regardless of the status of the processor, the arm Instruction Set and the thumb instruction set are both used.

The BX command can switch the operating status of the ARM Kernel Between arm and thumb.

PS: usage of BX.

Bx: A jump command with status switch to jump to the address specified by RM to execute the program. If the RM bit [0] is 1, the flag t of CPSR is automatically set during the jump, that is, the code of the target address is interpreted as the thumb status code. If the RM bit [0] is 0, the flag t in CPSR is automatically reset during the jump, the code of the target address is interpreted as arm code. The command format is as follows,

BX {cond} RM

These two command systems were designed to allow users to better control the amount of code.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.