]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
CPU tester configurable minimum SR interrupt mask in supervisor mode tests.
authorToni Wilen <twilen@winuae.net>
Fri, 13 Sep 2019 14:05:28 +0000 (17:05 +0300)
committerToni Wilen <twilen@winuae.net>
Fri, 13 Sep 2019 14:05:28 +0000 (17:05 +0300)
cputest.cpp
cputest/cputestgen.ini
cputest/main.c

index ab5af4d69ba294888a2db7d35c4844e75aaf8fe9..847f39fc43ad589367201e20333d85f5737002b5 100644 (file)
@@ -57,6 +57,7 @@ static int verbose = 1;
 static int feature_exception3_data = 0;
 static int feature_exception3_instruction = 0;
 static int feature_sr_mask = 0;
+static int feature_min_interrupt_mask = 0;
 static int feature_loop_mode = 0;
 static int feature_loop_mode_register = -1;
 static int feature_full_extension_format = 0;
@@ -1852,8 +1853,16 @@ static void execute_ins(uae_u16 opc, uaecptr endpc, uaecptr targetpc, struct ins
                // Supervisor mode and A7 was modified: skip this test round.
                if (s && regs.regs[15] != a7) {
                        // but not if RTE
-                       if (!is_superstack_use_required())
+                       if (!is_superstack_use_required()) {
                                test_exception = -1;
+                               break;
+                       }
+               }
+
+               // skip test if SR interrupt mask got too low
+               if (regs.intmask < feature_min_interrupt_mask) {
+                       test_exception = -1;
+                       break;
                }
 
                if (!test_exception) {
@@ -3027,6 +3036,8 @@ int __cdecl main(int argc, char *argv[])
        ini_getval(ini, INISECTION, _T("feature_exception3_instruction"), &feature_exception3_instruction);
        feature_sr_mask = 0;
        ini_getval(ini, INISECTION, _T("feature_sr_mask"), &feature_sr_mask);
+       feature_min_interrupt_mask = 0;
+       ini_getval(ini, INISECTION, _T("feature_min_interrupt_mask"), &feature_min_interrupt_mask);
        feature_loop_mode = 0;
        ini_getval(ini, INISECTION, _T("feature_loop_mode"), &feature_loop_mode);
        if (feature_loop_mode) {
index 1b20e909270ecaeb84c418e6ff1b587cbf16e3b8..73be2a76d7b0bbfb112cfe58d976f463dabdd12f 100644 (file)
@@ -54,6 +54,12 @@ feature_exception3_instruction=0
 ; 1 = all zeros and all ones only (2 CCR loops, 32 FPU loops)
 feature_flags_mode=1
 
+; SR min interrupt mask
+; Amiga: can be zero.
+; Atari ST: should be 3 or larger.
+; Skips all tests that would set lower interrupt mask.
+feature_min_interrupt_mask=0
+
 ; SR extra mask.
 ; 0x8000 = T1
 ; 0x4000 = T0 (68020-68040)
index f91eb09f31bbc65462e92b1a35940e869e08b28f..35ea9bf23fbdc77bb829732d49400e8d8f516258 100644 (file)
@@ -1644,7 +1644,7 @@ int main(int argc, char *argv[])
 
 #else
 
-#define _stricmp stricmp
+#define _stricmp strcasecmp
 
        if (strlen(argv[1]) >= sizeof(opcode) - 1)
                return 0;