From: Toni Wilen Date: Tue, 17 Dec 2019 16:22:15 +0000 (+0200) Subject: Fix cpu tester disassembler not disassembling branches. X-Git-Tag: 4300~4 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=11e40a603446c0c5683efb0f0ce14fbaa20725e4;p=francis%2Fwinuae.git Fix cpu tester disassembler not disassembling branches. --- diff --git a/cputest/adis/opcode_handler_cpu.c b/cputest/adis/opcode_handler_cpu.c index 700b467b..0700fd24 100644 --- a/cputest/adis/opcode_handler_cpu.c +++ b/cputest/adis/opcode_handler_cpu.c @@ -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]); diff --git a/cputest/adis/util.c b/cputest/adis/util.c index 75654c80..6280b541 100644 --- a/cputest/adis/util.c +++ b/cputest/adis/util.c @@ -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;