Shadow Register
Hi,
i'am using Nios II with shadow register. I'am using the directions that are discribe in Nios II Processor Reference Handbook.
If the processor is currently running in the normal register set, I use estatus.CRS and execute eret.
If the processor is running in the shadow register set I use sstatus.CRS and execute eret.
It is possible to switch into the first shadow register set (estatus.CRS = 0x400) and it is also possible to switch from the first shadow register set to the second shadow register set (sstatus.CRS=0x800). Unfortunately it's not possible to switch into normal register set (sstatus.CRS=0x0). The status register is updated but no other register is modified or restored. Did you have some excample code for using shadow register?
Thank you for your reply.