Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does 'bank'ing a register mean?

Tags:

cpu

arm

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?

like image 500
lang2 Avatar asked Nov 17 '12 16:11

lang2


People also ask

What are banked out registers?

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.

What are banked registers used for?

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.

What is banked register in arm?

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.

What is the size of bank register?

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.


1 Answers

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

like image 109
enjoylife Avatar answered Oct 08 '22 13:10

enjoylife