From: Toni Wilen Date: Thu, 8 Nov 2018 16:22:59 +0000 (+0200) Subject: Fixed non-C++ mode 68030 MMU TRY/CATCH. X-Git-Tag: 4100~33 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=1991a1137dca6194fceda9890133cccaf10edee9;p=francis%2Fwinuae.git Fixed non-C++ mode 68030 MMU TRY/CATCH. --- diff --git a/debug.cpp b/debug.cpp index 90f8f1ff..6c918245 100644 --- a/debug.cpp +++ b/debug.cpp @@ -459,6 +459,7 @@ int debug_safe_addr (uaecptr addr, int size) else addr = mmu030_translate (addr, regs.s != 0, (debug_mmu_mode & 1), false); } CATCH(p) { + STOPTRY; return 0; } ENDTRY regs.s = olds; diff --git a/include/mmu_common.h b/include/mmu_common.h index d3caf6e5..c2768c9f 100644 --- a/include/mmu_common.h +++ b/include/mmu_common.h @@ -21,6 +21,7 @@ struct m68k_exception { #define THROW(n) throw m68k_exception(n) #define THROW_AGAIN(var) throw #define ENDTRY +#define STOPTRY #else /* we are in plain C, just use a stack of long jumps */ #include @@ -30,6 +31,7 @@ extern int __exvalue; if (__exvalue==0) { __pushtry(&__exbuf); #define CATCH(x) __poptry(); } else {m68k_exception x=__exvalue; #define ENDTRY __poptry();} +#define STOPTRY __poptry() #define THROW(x) if (__is_catched()) {longjmp(__exbuf,x);} #define THROW_AGAIN(var) if (__is_catched()) longjmp(*__poptry(),__exvalue) #define SAVE_EXCEPTION diff --git a/newcpu.cpp b/newcpu.cpp index 63ff67d1..784628b3 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -9616,6 +9616,7 @@ static void fill_icache030 (uae_u32 addr) regs.cacheholdingaddr020 = 0xffffffff; regs.cacheholdingdata020 = 0xffffffff; end_020_cycle_prefetch(false); + STOPTRY; return; } ENDTRY