#define USE_ALIAS 1 #define USE_F_ALIAS 1 #define USE_SOFT_FLUSH 1 #define USE_OFFSET 1 #define COMP_DEBUG 1 #if COMP_DEBUG #define Dif(x) if (x) #else #define Dif(x) if (0) #endif #define SCALE 2 #define MAXCYCLES (1000 * CYCLE_UNIT) #define MAXREGOPT 65536 #define BYTES_PER_INST 10240 /* paranoid ;-) */ #define LONGEST_68K_INST 16 /* The number of bytes the longest possible 68k instruction takes */ #define MAX_CHECKSUM_LEN 2048 /* The maximum size we calculate checksums for. Anything larger will be flushed unconditionally even with SOFT_FLUSH */ #define MAX_HOLD_BI 3 /* One for the current block, and up to two for jump targets */ #define INDIVIDUAL_INST 0 #define FLAG_C 0x0010 #define FLAG_V 0x0008 #define FLAG_Z 0x0004 #define FLAG_N 0x0002 #define FLAG_X 0x0001 #define FLAG_CZNV (FLAG_C | FLAG_Z | FLAG_N | FLAG_V) #define FLAG_ZNV (FLAG_Z | FLAG_N | FLAG_V) #define KILLTHERAT 1 /* Set to 1 to avoid some partial_rat_stalls */ /* Whether to preserve registers across calls to JIT compiled routines */ #if defined X86_ASSEMBLY #define USE_PUSH_POP 0 #else #define USE_PUSH_POP 1 #endif #define N_REGS 8 /* really only 7, but they are numbered 0,1,2,3,5,6,7 */ #define N_FREGS 6 /* That leaves us two positions on the stack to play with */ /* Functions exposed to newcpu, or to what was moved from newcpu.c to * compemu_support.c */ extern void init_comp(void); extern void flush(int save_regs); extern void small_flush(int save_regs); extern void set_target(uae_u8* t); extern void freescratch(void); extern void build_comp(void); extern void set_cache_state(int enabled); #ifdef JIT extern void flush_icache(int n); #endif extern void compile_block (const cpu_history *pc_hist, int blocklen, int totcyles); extern int check_for_cache_miss(void); #define scaled_cycles(x) (currprefs.m68k_speed==-1?(((x)/SCALE)?(((x)/SCALE