Saved Program Status Registers in AArch64 state
The Saved Program Status Registers (SPSRs) are 32-bit registers that store the process state of the current exception level when an exception is taken to an exception level that uses AArch64 state. This allows the process state to be restored after the exception has been handled.
In AArch64 state, each target exception level has its own SPSR:
When taking an exception, the process state of the current exception level is stored in the SPSR of the target exception level. On returning from an exception, the exception handler uses the SPSR of the exception level that is being returned from to restore the process state of the exception level that is being returned to.
NoteOn returning from an exception, the preferred return address is restored from the ELR associated with the exception level that is being returned from.
The SPSRs store the following information:
- N, Z, C, and V flags.
- D, A, I, and F interrupt disable bits.
- The register width.
- The execution mode.
- The IL and SS bits.