From 6632cd1508c47e3e131a6801954e696d92935360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Fr=C3=B6schle?= Date: Sun, 17 Apr 2016 18:20:28 +0000 Subject: [PATCH] experimental: directly jump through bus error vector on bus error --- BaS_gcc/sys/exceptions.S | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/BaS_gcc/sys/exceptions.S b/BaS_gcc/sys/exceptions.S index dbedfd7..2af0db2 100644 --- a/BaS_gcc/sys/exceptions.S +++ b/BaS_gcc/sys/exceptions.S @@ -326,8 +326,9 @@ access: move.l 4(a6),-(sp) // push format_status move.l 8(a6),-(sp) // pc at exception move.l MCF_MMU_MMUAR,-(sp) // MMU fault address - move.l MCF_MMU_MMUSR,-(sp) // MMU status regisrter - move.w #0x2300,sr // can lower interrupt mask now that MMU status is safe + move.l MCF_MMU_MMUSR,-(sp) // MMU status register + // probably doesn't make sense since we still have a potential unmapped MMU page + // move.w #0x2300,sr // can lower interrupt mask now that MMU status is safe jsr _mmutr_miss // call C routine lea 4 * 4(sp),sp // adjust stack @@ -341,7 +342,9 @@ access: bus_error: movem.l (sp),d0-d1/a0-a1 // restore registers unlk a6 - bra std_exc_vec // FIXME: this seems to be bogous... + move.l 0x08,-(sp) + rts + // bra std_exc_vec // FIXME: this seems to be bogous... zero_divide: move.w #0x2700,sr // disable interrupt