Impact of ARM7 and arm9-flow on PC

Source: Internet
Author: User
Impact of ARM7 and arm9-flow on PC

"PC = PC + 1". This is not completely correct. The addition of one from the PC indicates that when there is no non-pipeline, it is decoded by referring to it, execution refers to sequential execution.

However, when there is a flow of water, it is more complicated. Here we use ARM7 and ARM9.

Class 7 is a 3-level flow. ARM9. During the execution process, the PC is incremented by 8 each time. The reason is as follows:

For ease of Problem description, we assume that the instruction at 0 address is being executed, and we can draw a clear conclusion from the following two figures.

The ARM7 is a three-level assembly line, and the three-level assembly line of amr7 is as follows:

There are 5-level pipelines for ARM9. the 5-level pipelines for arm9-are as follows:

It can be seen that the root cause of PC = current command execution address + 8 in both arm and arm is that in the assembly line design of both, the command execution stage is in the third stage of the assembly line.

 

R15 (PC) always points to the instruction that is taking the finger, instead of the instruction that is executing or decoding. In general, it is customary to refer to the first instruction as a reference point, so PC always points to the third instruction. When the arm status is set, each command is 4 bytes long. Therefore, the PC always points to the command address and adds an 8-byte address, that is, the PC value = the currentProgramExecution Position + 8;

 

Note: The PC in ads really points to the command to be executed. This is the result of software processing, mainly for the convenience of debugging the program.

 

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.