fix another case of movem PC saving
[cyclone68000.git] / Main.cpp
index 13efac2..b6f49c3 100644 (file)
--- a/Main.cpp
+++ b/Main.cpp
@@ -169,13 +169,14 @@ static void AddressErrorWrapper(char rw, const char *dataprg, int iw)
 }\r
 #endif\r
 \r
-void FlushPC(void)\r
+void FlushPC(int force)\r
 {\r
 #if MEMHANDLERS_NEED_PC\r
-  if (pc_dirty)\r
-    ot("  str r4,[r7,#0x40] ;@ Save PC\n");\r
-#endif\r
+  force |= pc_dirty;\r
   pc_dirty = 0;\r
+#endif\r
+  if (force)\r
+    ot("  str r4,[r7,#0x40] ;@ Save PC\n");\r
 }\r
 \r
 static void PrintFramework()\r