mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 18:55:49 +00:00
1f6f6b2863
The action to potentially switch sp register is not occurring at the correct point in the interrupt entry or exception exit sequences. For the interrupt entry case the sp on entry is used to create the stack exception frame - but this may well be the user stack pointer, since we haven't done the switch yet. Re-order the flow to switch the sp regs then use the current sp to create the exception frame. For the return from exception case the code is unwinding the sp after switching sp registers. But it should always unwind the supervisor sp first, then carry out any required sp switch. Note that these problems don't effect operation unless the user sp bit is set in the CACR register. Only a single sp is used in the default power up state. Previously Linux only used this single sp mode. But modern versions of Linux use the user sp mode now, so we need correct behavior for Linux to work. Backports commit 0c8ff723bd29e5c8b2ca989f857ae5c37ec49c4e from qemu |
||
---|---|---|
.. | ||
cpu-qom.h | ||
cpu.c | ||
cpu.h | ||
helper.c | ||
helper.h | ||
m68k-qreg.h | ||
Makefile.objs | ||
op_helper.c | ||
qregs.def | ||
translate.c | ||
unicorn.c | ||
unicorn.h |