When I read about MIPS architecture, I came across shadow registers which are said to be copies of general purpose registers.
I couldn't understand the following: When are shadow registers used?
MIPS shadow registers are used to reduce register load/store overhead in handling interrupts. An interrupt to which a shadow register set is assigned does not need to save any of the existing context to provide free registers or load any interrupt-specific data stored in the shadow registers at entry to the interrupt handler; at exit of the interrupt handler no saving of the interrupt handler context or restoring of the previous context is necessary.
ARM provides a similar functionality with what it calls banked registers. (For ARM, only some of the GPRs are replicated.)
The MIPS Multithreading Application Specific Extension extends the use of shadow register sets to become thread contexts. (Shadow register sets in effect support a very limited form of switch-on-event-multithreading where the extra threads are conceptually limited to interrupt handlers and the events to interrupts.)
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