From 882ba183c32fba7e4dededb8b1bdcefcfafba2aa Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Mon, 27 Jan 2020 20:31:32 +0200 Subject: [PATCH] Do not create pointless ILLEGAL.B. --- cputest.cpp | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/cputest.cpp b/cputest.cpp index 8f0fcb4e..148b0969 100644 --- a/cputest.cpp +++ b/cputest.cpp @@ -3393,14 +3393,16 @@ static void test_mnemo(const TCHAR *path, const TCHAR *mnemo, const TCHAR *ovrfi if (dp->mnemo != lookup->mnemo) continue; - // match requested size - if ((size >= 0 && size <= 2) && (size != dp->size || dp->unsized)) - continue; - if (size == 3 && !dp->unsized) - continue; - // skip all unsupported instructions if not specifically testing i_ILLG - if (dp->clev > cpu_lvl && lookup->mnemo != i_ILLG) - continue; + if (lookup->mnemo != i_ILLG) { + // match requested size + if ((size >= 0 && size <= 2) && (size != dp->size || dp->unsized)) + continue; + if (size == 3 && !dp->unsized) + continue; + // skip all unsupported instructions if not specifically testing i_ILLG + if (dp->clev > cpu_lvl) + continue; + } if (feature_loop_mode_68010) { if (!opcode_loop_mode(opcode)) @@ -4516,10 +4518,14 @@ static void test_mnemo_text(const TCHAR *path, const TCHAR *mode) test_mnemo(path, lookuptab[mnemo].name, ovrname, i, fpuopcode); } } else { - test_mnemo(path, lookuptab[mnemo].name, ovrname, 0, -1); - test_mnemo(path, lookuptab[mnemo].name, ovrname, 4, -1); - test_mnemo(path, lookuptab[mnemo].name, ovrname, 6, -1); - test_mnemo(path, lookuptab[mnemo].name, ovrname, -1, -1); + if (lookuptab[mnemo].mnemo == i_ILLG) { + test_mnemo(path, lookuptab[mnemo].name, ovrname, -1, -1); + } else { + test_mnemo(path, lookuptab[mnemo].name, ovrname, 0, -1); + test_mnemo(path, lookuptab[mnemo].name, ovrname, 4, -1); + test_mnemo(path, lookuptab[mnemo].name, ovrname, 6, -1); + test_mnemo(path, lookuptab[mnemo].name, ovrname, -1, -1); + } } } else { test_mnemo(path, lookuptab[mnemo].name, ovrname, sizes, fpuopcode); -- 2.47.3