don't pass trash in MSB bits to write8 and write16 handlers
[cyclone68000.git] / OpAny.cpp
index 9d45a01..8cb8c09 100644 (file)
--- a/OpAny.cpp
+++ b/OpAny.cpp
@@ -112,7 +112,7 @@ void OpEnd(int sea, int tea)
   }\r
   if (opend_check_interrupt)\r
   {\r
-    ot("  blt CycloneEnd\n");\r
+    ot("  ble CycloneEnd\n");\r
     ot(";@ CheckInterrupt:\n");\r
     if (!opend_check_trace)\r
       ot("  ldr r1,[r7,#0x44]\n");\r
@@ -126,7 +126,7 @@ void OpEnd(int sea, int tea)
   }\r
   else\r
   {\r
-    ot("  ldrge pc,[r6,r8,asl #2] ;@ Jump to opcode handler\n");\r
+    ot("  ldrgt pc,[r6,r8,asl #2] ;@ Jump to opcode handler\n");\r
     ot("  b CycloneEnd\n");\r
   }\r
   ot("\n");\r
@@ -159,6 +159,12 @@ int OpGetFlags(int subtract,int xbit,int specialz)
   return 0;\r
 }\r
 \r
+void OpGetFlagsNZ(int rd)\r
+{\r
+  ot("  and r10,r%d,#0x80000000 ;@ r10=N_flag\n",rd);\r
+  ot("  orreq r10,r10,#0x40000000 ;@ get NZ, clear CV\n");\r
+}\r
+\r
 // -----------------------------------------------------------------\r
 \r
 int g_op;\r