We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Can I have the meaning of why r3,r4 registers are called scratch registers
Hello, I'm not sure which document you are referring to (as r4 is typically not a scratch register), but in the Arm Procedure call standard, r0-r3, and r12 are defined as scratch registers, meaning that when a function is called, the values therein may be different upon return. This is not an issue for C programming, the compiler will look after everything for you, but if writing assembler level code, this is important. Also important for exception handling.
For more detail see:https://developer.arm.com/docs/ihi0042/latestRegards,
Ronan