]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fix cpu tester disassembler not disassembling branches.
authorToni Wilen <twilen@winuae.net>
Tue, 17 Dec 2019 16:22:15 +0000 (18:22 +0200)
committerToni Wilen <twilen@winuae.net>
Tue, 17 Dec 2019 16:22:15 +0000 (18:22 +0200)
cputest/adis/opcode_handler_cpu.c
cputest/adis/util.c

index 700b467b9e27b8f845c9e529a6381515a031ecae..0700fd24b8cb5cf6c79eca2decd1c6ed365c4112 100644 (file)
@@ -593,7 +593,7 @@ if (offset == 0)
   offset = (WORD)*(code + 1);
   used = 2;
   }
-else if (offset == -1)
+else if (offset == -1 && cpu68020)
   {
   /* long displacement */
   if (!cpu68020)
@@ -608,8 +608,8 @@ else
   }
 
 ref = offset + current_ref + 2;
-if (ODD (offset) || ref < first_ref || ref >= last_ref)
-  return (TRANSFER);
+//if (ODD (offset) || ref < first_ref || ref >= last_ref)
+//  return (TRANSFER);
 
 if (pass3)
   {
@@ -640,8 +640,8 @@ uint dbranch (struct opcode_entry *op)
 {
 ULONG ref;
 
-if (*(code + 1) & 0x1)  /* branch to an odd address */
-  return (TRANSFER);
+//if (*(code + 1) & 0x1)  /* branch to an odd address */
+//  return (TRANSFER);
 
 if (pass3)
   str_cpy (src, reg_names [*code & 7]);
index 75654c8051b7c75631712dbc52702e33c32c0561..6280b541a384e2771cf9b6d6a8216cfece3d6382 100644 (file)
@@ -970,6 +970,10 @@ uint disasm_instr(UWORD *instr, char *out)
        struct opcode_entry *op;
        uint size = 0;
 
+    first_ref = 0;
+    last_ref = 0xffffffff;
+    current_ref = (ULONG)instr;
+
        set_pass3;
 
        opcode[0] = src[0] = dest[0] = 0;