Arm Community
Site
Search
User
Site
Search
User
Groups
Education Hub
Distinguished Ambassadors
Open Source Software and Platforms
Research Collaboration and Enablement
Forums
AI and ML forum
Architectures and Processors forum
Arm Development Platforms forum
Arm Development Studio forum
Arm Virtual Hardware forum
Automotive forum
Compilers and Libraries forum
Graphics, Gaming, and VR forum
High Performance Computing (HPC) forum
Infrastructure Solutions forum
Internet of Things (IoT) forum
Keil forum
Morello forum
Operating Systems forum
SoC Design and Simulation forum
SystemReady Forum
Blogs
AI and ML blog
Announcements
Architectures and Processors blog
Automotive blog
Graphics, Gaming, and VR blog
High Performance Computing (HPC) blog
Infrastructure Solutions blog
Internet of Things (IoT) blog
Operating Systems blog
SoC Design and Simulation blog
Tools, Software and IDEs blog
Support
Arm Support Services
Documentation
Downloads
Training
Arm Approved program
Arm Design Reviews
Community Help
More
Cancel
Support forums
Arm Development Studio forum
Concept of Scratch and Preserved Registers
Jump...
Cancel
Locked
Locked
Replies
4 replies
Subscribers
118 subscribers
Views
16784 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
How was your experience today?
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
Concept of Scratch and Preserved Registers
Muhammad Ahsan
over 10 years ago
Hi,
I am confused in understanding the difference between scratch and preserved registers. I have read the development guide of IAR Embedded Workbench but the topic was written in such a way that I could not get the real sence of it.
Any help or if possible some example that can help me differenciating between the both will be regarded.
Thanks in advance
Top replies
Martin Weidmann
over 10 years ago
+1
Note: This was originally posted on 5th April 2011 at http://forums.arm.com I've not used IAR's tools, but I'm assuming it follows the AAPCS (Procedure Call Standard for the ARM Architecture). The AAPCS...
Parents
Alexei Toumantsev
over 10 years ago
Note: This was originally posted on 5th April 2011 at
http://forums.arm.com
r4-r11 - protected
And r13, r14 too, of course. To the OP - AAPCS is what you need to google for.
Note that the rules stated above are not any sort of 'restrictions' imposed by ARM CPU, some people get confused by this.
All registers in ARM (except for r14 (lr) and r15 (pc)) are mutually interchangeable ("equal in rights").
But most compilers follow the AAPCS rules to avoid compatibility problems (otherwise, it would be difficult to link together libraries produced with different compilers, for example).
Cancel
Up
0
Down
Cancel
Reply
Alexei Toumantsev
over 10 years ago
Note: This was originally posted on 5th April 2011 at
http://forums.arm.com
r4-r11 - protected
And r13, r14 too, of course. To the OP - AAPCS is what you need to google for.
Note that the rules stated above are not any sort of 'restrictions' imposed by ARM CPU, some people get confused by this.
All registers in ARM (except for r14 (lr) and r15 (pc)) are mutually interchangeable ("equal in rights").
But most compilers follow the AAPCS rules to avoid compatibility problems (otherwise, it would be difficult to link together libraries produced with different compilers, for example).
Cancel
Up
0
Down
Cancel
Children
No data