add fixup for uncompressed jumptable
[cyclone68000.git] / Main.cpp
index 9ef8a2b..13efac2 100644 (file)
--- a/Main.cpp
+++ b/Main.cpp
@@ -306,7 +306,12 @@ static void PrintFramework()
   ot("  bx lr\n");\r
   ltorg();\r
 #else\r
-  ot(";@ do nothing\n");\r
+  ot(";@ fix final jumptable entries\n");\r
+  ot("  ldr r12,=CycloneJumpTab\n");\r
+  ot("  add r12,r12,#0x10000*4\n");\r
+  ot("  ldr r0,[r12,#-3*4]\n");\r
+  ot("  str r0,[r12,#-2*4]\n");\r
+  ot("  str r0,[r12,#-1*4]\n");\r
   ot("  bx lr\n");\r
 #endif\r
   ot("\n");\r