]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fixed 68060 unimplemented instruction enable/disable.
authorToni Wilen <twilen@winuae.net>
Mon, 6 Jun 2016 15:46:29 +0000 (18:46 +0300)
committerToni Wilen <twilen@winuae.net>
Mon, 6 Jun 2016 15:46:29 +0000 (18:46 +0300)
newcpu.cpp

index 4f9ffa5e0c27fbd805c015fa0cc3bb30a4669ce1..c017c445105fa3c5ccdffdce7f50286177dc4162 100644 (file)
@@ -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;
                                }