X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Main.cpp;h=b6f49c3b2f532098e5a975b046a247d3b955c60b;hb=19a2e09532d56379faa16b2a95bff6703a35774f;hp=9ef8a2b965a063301d762798aba01f5790e0deec;hpb=c6237d9e43c8a8854155757b80b77161a9570535;p=cyclone68000.git diff --git a/Main.cpp b/Main.cpp index 9ef8a2b..b6f49c3 100644 --- a/Main.cpp +++ b/Main.cpp @@ -169,13 +169,14 @@ static void AddressErrorWrapper(char rw, const char *dataprg, int iw) } #endif -void FlushPC(void) +void FlushPC(int force) { #if MEMHANDLERS_NEED_PC - if (pc_dirty) - ot(" str r4,[r7,#0x40] ;@ Save PC\n"); -#endif + force |= pc_dirty; pc_dirty = 0; +#endif + if (force) + ot(" str r4,[r7,#0x40] ;@ Save PC\n"); } static void PrintFramework() @@ -306,7 +307,12 @@ static void PrintFramework() ot(" bx lr\n"); ltorg(); #else - ot(";@ do nothing\n"); + ot(";@ fix final jumptable entries\n"); + ot(" ldr r12,=CycloneJumpTab\n"); + ot(" add r12,r12,#0x10000*4\n"); + ot(" ldr r0,[r12,#-3*4]\n"); + ot(" str r0,[r12,#-2*4]\n"); + ot(" str r0,[r12,#-1*4]\n"); ot(" bx lr\n"); #endif ot("\n");