Mode Register SX52 vs SX28
pjv
Posts: 1,903
Hi Guenther;
I just checked the MODE register on the SX52, and confirm that the mode is saved when interrupt is entered, and is restored when exited.
Just now I can't see a way to prove whether it has a one level or two level shadow stack, albeit I believe it is only a single, and I can't see any use for it to be a double.
Also, the SX28 does not save and restore the Mode register into and out of interrupt.
Furthermore, it is interesting to note that for the SX52, the debugger will not permit access to the M register for altering·its value directly in the dbugger, whereas that can be done in the case of the SX28. Wonder why that is............. Anyone??
Peter (pjv)
·
I just checked the MODE register on the SX52, and confirm that the mode is saved when interrupt is entered, and is restored when exited.
Just now I can't see a way to prove whether it has a one level or two level shadow stack, albeit I believe it is only a single, and I can't see any use for it to be a double.
Also, the SX28 does not save and restore the Mode register into and out of interrupt.
Furthermore, it is interesting to note that for the SX52, the debugger will not permit access to the M register for altering·its value directly in the dbugger, whereas that can be done in the case of the SX28. Wonder why that is............. Anyone??
Peter (pjv)
·
Comments
thanks for checking the behavior of saving/restoring the mode register on interrupts. In the meantime, I have modified SXSim so that it saves the mode register when an interrupt is entered, and restores it when the interrupt is exited, provided an SX 48/52 is simulated. No matter if there is a single, or two level stack in reality, the simulation should now work as the "real silicon".
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G