Explain the problem of the arm assembly line such as add r0, PC, # g_oaladdresstable-(. + 8 ).

Source: Internet
Author: User

// Topic: explain the problem of the arm assembly line such as add r0, PC, # g_oaladdresstable-(. + 8 ).

// By gooogleman

// Mail: gooogleman@foxmail.com

// URL: http://blog.csdn.net/gooogleman/article/details/7651548

About add r0, PC, # g_oaladdresstable -(. + 8) Many people have asked about this command in the csdn forum. I have answered a lot before. I am still in the Development Board Technical Support Group, it seems that he does not understand what to say.

In fact, he is in a dead end and has to think about it with his own mind.

In fact, this is what arm agreed to do. Arm uses this pipeline method to do it very scientifically, just like our factory pipeline method in reality, which can improve efficiency.

Well, no matter whether it is ARM7, arm11, or even s5pv210, it is in line with the title. The reason is as follows:

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, so the PC always points to the command address plus an 8-byte address, that is, the PC value = the current program execution Position + 8;

 

Among the three eboot instances

 

Add R11, PC, # g_oaladdresstable-(. + 8)

In winceeboot of sate210 I also have the following:

Add R11, PC, # g_oaladdresstable-(. + 8)

Don't you understand?

Let's see arm's official documents.

Complete introduction see documents: http://www.arm.com/pdfs/comparison-arm7-arm9-v1.pdf

 

Let's look at the meaning of this paragraph!

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, so the PC always points to the command address plus an 8-byte address, that is, the PC value = the current program execution Position + 8;

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.