From: Toni Wilen Date: Mon, 6 Jun 2016 15:46:29 +0000 (+0300) Subject: Fixed 68060 unimplemented instruction enable/disable. X-Git-Tag: 3300~1 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=786200f8da23250fb30239e291bd03988ef78fef;p=francis%2Fwinuae.git Fixed 68060 unimplemented instruction enable/disable. --- diff --git a/newcpu.cpp b/newcpu.cpp index 4f9ffa5e..c017c445 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -1354,12 +1354,18 @@ static void build_cpufunctbl (void) /* unimplemented opcode? */ if (table->unimpclev > 0 && lvl >= table->unimpclev) { if (currprefs.cpu_model == 68060) { - // unimpclev == 5: not implemented in 68060. + // remove unimplemented integer instructions + // unimpclev == 5: not implemented in 68060, + // generates unimplemented instruction exception. if (currprefs.int_no_unimplemented && table->unimpclev == 5) { cpufunctbl[opcode] = op_unimpl_1; continue; } - if (!currprefs.int_no_unimplemented || table->unimpclev != 5) { + // remove unimplemented instruction that were removed in previous models, + // generates normal illegal instruction exception. + // unimplclev < 5: instruction was removed in 68040 or previous model. + // clev=4: implemented in 68040 or later. unimpclev=5: not in 68060 + if (table->unimpclev < 5 || (table->clev == 4 && table->unimpclev == 5)) { cpufunctbl[opcode] = op_illg_1; continue; }