ARM-Exception Interrupt Handling Overview (5)

Control program execution flow

In the ARM system, there are usually the following three ways to control the execution process of the program:

  • During normal program execution, each time an ARM instruction is executed, the value of the program count register PC increases by 4 bytes; each time a Thumb instruction is executed, the value of the program count register PC increases by 2 bytes. The whole process is executed sequentially.
  • Through the jump instruction, the program can jump to a specific address label for execution, or jump to a specific subroutine for execution
    • B: The instruction is used to perform a jump operation
    • BL: The instruction saves the return address of the subroutine while executing the jump
    • BX: The instruction can switch the program to the Thumb state according to the lowest bit of the target address while executing the jump.
    • BLX: The instruction performs three operations ①Jump to the target address ②Save the return address of the subroutine ③The program state can be switched to the Thumb state according to the lowest bit of the target address.
  • When an abnormal interrupt occurs, after the system executes the current instruction, it will jump to the corresponding interrupt handler for execution. When the execution of the exception interrupt handler is completed, the program returns to the next instruction where the interrupt instruction occurred. When entering the abnormal interrupt processing program, the execution site of the interrupted program should be saved, and when exiting from the abnormal interrupt processing program, the execution site of the interrupted program should be restored.

Types of abnormal interrupts in the ARM system

insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/tyustli/article/details/131462857