The ARM processor uses an assembly line to increase the speed of the processor's instruction flow, allowing several operations to be performed simultaneously, and making the operations between the processing and memory systems smoother and more continuous, providing 0.9mips/mhz instruction execution speed. The PC represents the program counter, the pipeline uses three stages, so the instruction is divided into three stages:
1. Refer to (Load an instruction from memory);
2. Decoding (identifying the instructions that will be executed);
3. Execute (Process instruction and write the result back to register).
The R15 (PC) always points to the "fetching" instruction, not to the "executing" instruction or to the instruction being "decoded." Generally speaking, people habitually agree that the "executing instruction as reference point" is called the current first instruction, so the PC always points to the third instruction. When arm state, each instruction is 4 bytes long, so the PC always points to the instruction address plus 8 byte address, namely: PC value = Current program execution position +8;
Cycle 1 Cycles 2 cycles 3 weeks 4 weeks 5 Cycle 6
PC-8 Fetch and decode execution
PC-4 Fetch and decode execution
pc Reference decoding Execute