static uae_u8 ccr_cnt;
static int condition_cnt;
static int subtest_count;
+static int test_count_missed;
struct uae_prefs currprefs;
static void fill_memory_buffer(uae_u8 *p, int size)
{
- uae_u8 *pend = p - 64;
+ uae_u8 *pend = p + size - 64;
int i = 0;
while (p < pend) {
int x = (i & 3);
interrupt_delay_cnt = 0;
interrupt_pc = 0;
waitstate_delay_cnt = 0;
+ test_count_missed = 0;
int sr_override = 0;
regs.usp = regs.regs[15];
regs.isp = super_stack_memory - 0x80;
- // copy user stack to super stack, for RTE etc support
- memcpy(test_memory + (regs.isp - test_memory_start), test_memory + (regs.usp - test_memory_start), 0x20);
+ if (regs.usp >= test_memory_start && regs.usp < test_memory_start + test_memory_size) {
+ // copy user stack to super stack, for RTE etc support
+ memcpy(test_memory + (regs.isp - test_memory_start), test_memory + (regs.usp - test_memory_start), 0x20);
+ } else {
+ skipped = 1;
+ }
regs.msp = super_stack_memory;
// data size optimization, only store data
}
// skip exceptions if loop mode and not CC instruction
- if (test_exception >= 2 && feature_loop_mode_jit && !isccinst(dp)) {
+ if (test_exception >= 2 && test_exception != 4 && feature_loop_mode_jit && !isccinst(dp)) {
skipped = 1;
}
instructionendpc_old = instructionendpc_old_prev;
startpc_old = startpc_old_prev;
interrupt_count = interrupt_count_old_prev;
+ test_count_missed++;
} else {
+ test_count_missed = 0;
full_format_cnt++;
data_saved = 1;
// if test used data or fpu register as a source or destination: modify it
}
}
+ if (test_count_missed > 10000) {
+ break;
+ }
+
if (nextround >= 0) {
+ for (;;) {
+ int r = rand8() & 7;
+ if (regchange(r, cur_regs.regs)) {
+ break;
+ }
+ }
+ for (;;) {
+ int r = rand8() & 7;
+ if (regchange(r + 8, cur_regs.regs)) {
+ break;
+ }
+ }
cur_regs.regs[0] &= 0xffff;
- cur_regs.regs[8] &= 0xffff;
+ cur_regs.regs[8 + 0] &= 0xffff;
cur_regs.regs[8 + 6]--;
- cur_regs.regs[15] -= 2;
+ cur_regs.regs[8 + 7] -= 2;
rnd_seed_prev = rnd_seed;
rand8_cnt_prev = rand8_cnt;
rand16_cnt_prev = rand16_cnt;
[cputest]
; CPU model (68000, 68020, 68030, 68040 or 68060).
-cpu=68040
+cpu=68020
; CPU address space.
; If 24-bit, tester will assume upper 8-bits of addresses gets ignored.
; Low address space limits. Real hardware must have RAM in this space. Comment out to disable.
; Start should be zero if Amiga, set to 0x0800 if Atari ST.
; Must be disabled if cycle counting (instruction/interrupt), cycle count tests must only access real Fast RAM.
-;test_low_memory_start=0x0000
-;test_low_memory_end=0x8000
+test_low_memory_start=0x0000
+test_low_memory_end=0x8000
; High address space limits (0x00ff8000 to 0x01000000 is complete space if 24-bit). Comment out to disable.
; Automatically disabled if 32-bit CPU and end == 0x01000000
;test_high_memory_start=0x00ff8000
-test_high_memory_end=0x01000000
+;test_high_memory_end=0x01000000
; ROM high address space. High memory is only used for read tests, uses last 32k of ROM image file.
high_rom=D:\amiga\roms\Kickstart v3.1 rev 40.63 (1993)(Commodore)(A500-A600-A2000)[!].rom
; main test memory start and size (real hardware must have RAM in this address space)
-test_memory_start=0x00460000
+test_memory_start=0x00500000
;test_memory_start=0x68800000
;test_memory_start=0x43800000
;test_memory_start=0x07800000
-test_memory_size=0xa0000
+test_memory_size=0x200000
;
-;test_memory_start=0x340000
-;test_memory_size=0x80000
+;test_memory_start=0x42000000
+;test_memory_size=0x1000000
; address where test instructions are located
; if not defined: mid point of test memory
-opcode_memory_start=0x87ffa0
+;opcode_memory_start=0x87ffa0
; number of test rounds
; registers are re-randomized after each round if not in target ea mode.
; interrupt timing test
[test=IPL]
cpu=68000-68010
-enabled=1
+enabled=0
verbose=0
feature_undefined_ccr=1
feature_interrupts=2
cpu_address_space=68020
feature_loop_mode=1
opcode_memory_start=-1
-mode=mvmel,mvmle,link,unlk
+mode=all
feature_flags_mode=1
test_rounds=3
+min_opcode_test_rounds=5000
verbose=0
; basic tests
enabled=0
cpu=68020-68060
cpu_address_space=68020
-feature_flags_mode=0
-verbose=1
+feature_loop_mode=1
+opcode_memory_start=-1
+test_rounds=4
+verbose=0
+min_opcode_test_rounds=5000
mode=all
; 68020+ addressing mode tests
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|Win32'">
<IncludePath>c:\dev\include;$(IncludePath)</IncludePath>
- <LibraryPath>C:\dev\lib;$(LibraryPath)</LibraryPath>
+ <LibraryPath>C:\dev\lib\x86;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IncludePath>c:\dev\include;$(IncludePath)</IncludePath>
- <LibraryPath>C:\dev\lib;$(LibraryPath)</LibraryPath>
+ <LibraryPath>C:\dev\lib\x86;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|x64'">
- <IncludePath>$(IncludePath)</IncludePath>
+ <IncludePath>c:\dev\include;$(IncludePath)</IncludePath>
+ <LibraryPath>C:\dev\lib\x64;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|ARM64'">
- <IncludePath>$(IncludePath)</IncludePath>
+ <IncludePath>C:\dev\include;$(IncludePath)</IncludePath>
+ <LibraryPath>C:\dev\lib\arm64;$(VC_LibraryPath_ARM64);$(WindowsSDK_LibraryPath_ARM64)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IncludePath>c:\dev\include;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<IncludePath>c:\dev\include;$(IncludePath)</IncludePath>
- <LibraryPath>C:\dev\lib\x64;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64)</LibraryPath>
+ <LibraryPath>C:\dev\lib\arm64;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64)</LibraryPath>
<TargetName>cputestgen64</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>zlibstat.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>zs.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Test|Win32'">
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
- <AdditionalDependencies>zlibstat.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>zs.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Test|x64'">
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
+ <AdditionalDependencies>zs.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Test|ARM64'">
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
+ <AdditionalDependencies>zs.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);zlibstat.lib</AdditionalDependencies>
+ <AdditionalDependencies>zs.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);zlibstat.lib</AdditionalDependencies>
+ <AdditionalDependencies>zs.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>