From: Toni Wilen Date: Fri, 13 Sep 2019 14:05:28 +0000 (+0300) Subject: CPU tester configurable minimum SR interrupt mask in supervisor mode tests. X-Git-Tag: 4300~121 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=7513b3f7a30c3deecd5ec56f7a074b7016a3bee8;p=francis%2Fwinuae.git CPU tester configurable minimum SR interrupt mask in supervisor mode tests. --- diff --git a/cputest.cpp b/cputest.cpp index ab5af4d6..847f39fc 100644 --- a/cputest.cpp +++ b/cputest.cpp @@ -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) { diff --git a/cputest/cputestgen.ini b/cputest/cputestgen.ini index 1b20e909..73be2a76 100644 --- a/cputest/cputestgen.ini +++ b/cputest/cputestgen.ini @@ -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) diff --git a/cputest/main.c b/cputest/main.c index f91eb09f..35ea9bf2 100644 --- a/cputest/main.c +++ b/cputest/main.c @@ -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;