diff --git a/runtime/init.c b/runtime/init.c index a735fa8..550a2d3 100644 --- a/runtime/init.c +++ b/runtime/init.c @@ -23,6 +23,12 @@ /* Global CPU state struct. */ CPUState cpu_state; +#if SIZEOF_CHAR_P == 4 +uint32 ROMlib_offset; +#else +uint64 ROMlib_offset; +#endif + /* This function initializes syn68k. Call it exactly once, before any * other syn68k calls. DOS_INT_FLAG_ADDR is the conventional memory * offset of the 32 bit synchronous interrupt flag. Just pass in zero diff --git a/test/driver.c b/test/driver.c index 80af50f..6297a8d 100644 --- a/test/driver.c +++ b/test/driver.c @@ -10,12 +10,6 @@ #include -#if SIZEOF_CHAR_P == 4 -uint32 ROMlib_offset = MEMORY_OFFSET; -#else -uint64 ROMlib_offset = MEMORY_OFFSET; -#endif - /* These are set by command-line switches. */ int test_only_non_cc_variants; /* If 0, test only cc setting variants. */ int generate_crc; diff --git a/test/main.c b/test/main.c index fff566f..c380970 100644 --- a/test/main.c +++ b/test/main.c @@ -28,6 +28,8 @@ main (int argc, char *argv[]) malloc_debug (31); /* Just to be safe. */ #endif + ROMlib_offset = MEMORY_OFFSET; + /* Set up default values for command line switches. */ test_only_non_cc_variants = 0; #ifdef mc68000