A processor register is a small storage location the processor can access directly while executing instructions. Low-level Rust code can interact with CPU registers or issue specific instructions using assembly features. section 5.5
Registers also carry function arguments and return values according to a platform’s procedure call standard. On Arm Cortex-M, ordinary arguments use R0–R3 first; additional arguments spill to the stack. section 8.1.2
A call with five arguments
For a function taking five 32-bit arguments, the first four go in R0–R3, the fifth goes on the stack, and the return value comes back in R0. section 8.1.2
Figure 8.1 AAPCS register allocation
See how the Arm procedure call standard assigns arguments and return values to registers. section 8.1.2








