From: Toni Wilen Date: Sun, 12 Jan 2020 17:56:59 +0000 (+0200) Subject: Illegal MOVEC disassembler PC fix. X-Git-Tag: 4400~175 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=dcca7b367aacdfeb41ba9a1348f55c4913d9dbab;p=francis%2Fwinuae.git Illegal MOVEC disassembler PC fix. --- diff --git a/disasm.cpp b/disasm.cpp index b36f52fc..77b994ec 100644 --- a/disasm.cpp +++ b/disasm.cpp @@ -1619,7 +1619,7 @@ uae_u32 m68k_disasm_2 (TCHAR *buf, int bufsize, uaecptr pc, uaecptr *nextpc, int struct instr *dp; uaecptr oldpc; uaecptr m68kpc_illg = 0; - bool illegal = false; + int illegal = 0; int segid, lastsegid; TCHAR *symbolpos; @@ -1629,12 +1629,12 @@ uae_u32 m68k_disasm_2 (TCHAR *buf, int bufsize, uaecptr pc, uaecptr *nextpc, int extra = get_word_debug (pc + 2); if (cpufunctbl[opcode] == op_illg_1 || cpufunctbl[opcode] == op_unimpl_1) { m68kpc_illg = pc + 2; - illegal = TRUE; + illegal = 1; } dp = table68k + opcode; if (dp->mnemo == i_ILLG) { - illegal = FALSE; + illegal = 0; opcode = 0x4AFC; dp = table68k + opcode; } @@ -1699,9 +1699,9 @@ uae_u32 m68k_disasm_2 (TCHAR *buf, int bufsize, uaecptr pc, uaecptr *nextpc, int int lvl = (currprefs.cpu_model - 68000) / 10; if (lvl == 6) lvl = 5; - if (lvl < 1 || !(m2cregs[j].flags & (1 << (lvl - 1)))) - illegal = true; pc += 2; + if (lvl < 1 || !(m2cregs[j].flags & (1 << (lvl - 1)))) + illegal = -1; } else if (lookup->mnemo == i_CHK2) { TCHAR *p; if (!(extra & 0x0800)) { @@ -2081,8 +2081,8 @@ uae_u32 m68k_disasm_2 (TCHAR *buf, int bufsize, uaecptr pc, uaecptr *nextpc, int buf = buf_out(buf, &bufsize, _T("\n")); } - if (illegal) - pc = m68kpc_illg; + if (illegal > 0) + pc = m68kpc_illg; } if (nextpc) *nextpc = pc;