Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the function of R0-R15 register in ARM

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

Today, I will talk to you about the role of R0-R15 registers in ARM, which may not be well understood by many people. in order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.

The function of R0-R15 Register in ARM

According to the ARM-thumb procedure call Standard:

R0-R3 is used as an argument to the incoming function, and the outgoing function returns a value. R0-R3 can be used for any purpose between subroutine calls. The called function does not have to restore R0-R3 before returning. If the calling function needs to use the contents of R0-R3 again, it must retain those contents. R4-R11 is used to store the local variables of the function. If the called function uses these registers, it must restore the values of these registers before returning them. R12 is an internal call to the temporary register IP. It is used for this role in procedure link gluing code (for example, interactive gluing code). It can be used for any purpose between procedure calls. The called function does not have to restore R12 before returning. R13 is the stack pointer SP. It cannot be used for any other purpose. The value stored in sp must be the same when exiting the called function as it was when entering. R14 is the link register LR. If you save the return address, you can use R14 for other purposes between calls, and when the program returns, R15 is the program counter PC. It cannot be used for any other purpose.

After reading the above, do you have any further understanding of the function of R0-R15 registers in ARM? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report