Reading 'ARM Architecture' on Wikipedia and found the following statement:
Registers R0-R7 are the same across all CPU modes; they are never banked.
R13 and R14 are banked across all privileged CPU modes except system mode.
What does banking a register mean?
A banked register maps one-to-one onto a user mode register. If you change processor mode, a banked register from the new mode will replace an existing register. For example, when the processor is in the interrupt request mode, the instructions you execute still access registers named r13 and r14.
Explanation: when switching from one mode to another, instead of storing the register contents somewhere else it'll be kept in the duplicate registers and the new values are stored in the actual registers.
ARM processors have 37 registers. The registers are arranged in partially overlapping banks. There is a different register bank for each processor mode. The banked registers give rapid context switching for dealing with processor exceptions and privileged operations.
32 bytes from 00H to 1FH locations are set aside for register banks and the stack. 16 bytes from 20H to 2FH locations are set aside for bit-addressable read/write memory.
Register banking refers to providing multiple copies of a register at the same address.
Taken from section 1.4.6 of the arm docs
The term is referring to a solution for the problem that not all registers can be seen at once.
There is a different register bank for each processor mode. The banked registers give rapid context switching for dealing with processor exceptions and privileged operations.
If your looking for a more theoretical reasoning, I recommend this paper.
Edit: A much deeper answer than mine is given here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With