MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / generate_cpu_test

Function generate_cpu_test

src/gencpu.cpp:10006–10084  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10004#if CPU_TESTER
10005
10006static void generate_cpu_test(int mode)
10007{
10008 char fname[100];
10009 const char *extra = "_test", *extraup;
10010 int rp;
10011 int id = 90 + mode;
10012
10013 using_tracer = 0;
10014 extraup = "";
10015 postfix = id;
10016
10017 fprintf(stblfile, "#ifdef CPUEMU_%d%s\n", postfix, extraup);
10018 sprintf(fname, "cpuemu_%d%s.cpp", postfix, extra);
10019 if (freopen(fname, "wb", stdout) == NULL) {
10020 abort();
10021 }
10022 generate_macros(stdout);
10023
10024 using_exception_3 = 1;
10025 using_bus_error = 1;
10026 using_prefetch = 0;
10027 using_prefetch_020 = 0;
10028 using_ce = 0;
10029 using_ce020 = 0;
10030 using_mmu = 0;
10031 using_waitstates = 0;
10032 memory_cycle_cnt = 4;
10033 mmu_postfix = "";
10034 xfc_postfix = "";
10035 using_simple_cycles = 0;
10036 using_indirect = 1;
10037 cpu_generic = false;
10038 need_exception_oldpc = 0;
10039
10040 cpu_level = 0;
10041 using_prefetch = 1;
10042 using_exception_3 = 1;
10043 using_simple_cycles = 1;
10044 func_noret = 1;
10045
10046 if (mode == 0) {
10047 using_simple_cycles = 0;
10048 using_ce = 1;
10049 } else if (mode == 1) {
10050 using_simple_cycles = 0;
10051 using_ce = 1;
10052 cpu_level = 1;
10053 } else if (mode == 2) {
10054 cpu_level = 2;
10055 using_prefetch = 0;
10056 using_simple_cycles = 0;
10057 } else if (mode == 3) {
10058 cpu_level = 3;
10059 using_prefetch = 0;
10060 using_simple_cycles = 0;
10061 } else if (mode == 4) {
10062 cpu_level = 4;
10063 using_prefetch = 0;

Callers 1

mainFunction · 0.85

Calls 3

generate_macrosFunction · 0.85
read_countsFunction · 0.70
generate_funcFunction · 0.70

Tested by

no test coverage detected