Fix bad memory access in NMI handler
CallNMIExceptionHandler was saving/restoring registers to the wrong offsets, causing it to potentially corrupt the first two slots of the LoadStoreErrorHandler's save area.
This commit is contained in:
parent
4dd8712526
commit
b6c2e4df59
1 changed files with 2 additions and 2 deletions
|
@ -340,12 +340,12 @@ LoadStoreErrorHandlerStack:
|
||||||
|
|
||||||
/* Save register relative to a0 */
|
/* Save register relative to a0 */
|
||||||
.macro SAVE_REG register, regnum
|
.macro SAVE_REG register, regnum
|
||||||
s32i \register, a0, (0x20 + 4 * \regnum)
|
s32i \register, a0, (4 * (\regnum + 6))
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
/* Load register relative to sp */
|
/* Load register relative to sp */
|
||||||
.macro LOAD_REG register, regnum
|
.macro LOAD_REG register, regnum
|
||||||
l32i \register, sp, (0x20 + 4 * \regnum)
|
l32i \register, sp, (4 * (\regnum + 6))
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
Loading…
Reference in a new issue