return epc fix

This commit is contained in:
Polprzewodnikowy 2022-01-11 22:23:36 +01:00
parent c7b6e8552e
commit 8615b7668b

View File

@ -116,11 +116,11 @@ exception_fatal:
sw $t0, C0_STATUS_OFFSET($k0) sw $t0, C0_STATUS_OFFSET($k0)
dmfc0 $t0, C0_EPC dmfc0 $t0, C0_EPC
sd $t0, C0_EPC_OFFSET($k0) sd $t0, C0_EPC_OFFSET($k0)
addiu $t0, 4
dmtc0 $t0, C0_EPC
move $a2, $k0 move $a2, $k0
la $t1, exception_fatal_handler la $t1, exception_fatal_handler
jalr $t1 jalr $t1
ld $t0, C0_EPC_OFFSET($k0)
dmtc0 $t0, C0_EPC
j exception_restore j exception_restore
exception_interrupt: exception_interrupt:
@ -194,8 +194,8 @@ exception_install:
bne $t4, $t5, 2b bne $t4, $t5, 2b
addiu $t1, VECTOR_SIZE addiu $t1, VECTOR_SIZE
bne $t1, $t2, 1b bne $t1, $t2, 1b
li $t7, (WATCHDOG_TIMEOUT * TICKS_PER_SECOND)
mtc0 $zero, C0_COUNT mtc0 $zero, C0_COUNT
li $t7, (WATCHDOG_TIMEOUT * TICKS_PER_SECOND)
mtc0 $t7, C0_COMPARE mtc0 $t7, C0_COMPARE
mfc0 $t7, C0_STATUS mfc0 $t7, C0_STATUS
ori $t7, (INTERRUPT_MASK_TIMER | INTERRUPT_ENABLE) ori $t7, (INTERRUPT_MASK_TIMER | INTERRUPT_ENABLE)