3 |
|
* |
4 |
|
* Original 68040 JIT compiler for UAE, copyright 2000-2002 Bernd Meyer |
5 |
|
* |
6 |
< |
* Adaptation for Basilisk II and improvements, copyright 2000-2002 |
6 |
> |
* Adaptation for Basilisk II and improvements, copyright 2000-2005 |
7 |
|
* Gwenole Beauchesne |
8 |
|
* |
9 |
< |
* Basilisk II (C) 1997-2002 Christian Bauer |
9 |
> |
* Basilisk II (C) 1997-2005 Christian Bauer |
10 |
|
* |
11 |
|
* This program is free software; you can redistribute it and/or modify |
12 |
|
* it under the terms of the GNU General Public License as published by |
41 |
|
#define TAGMASK 0x0000ffff |
42 |
|
#define TAGSIZE (TAGMASK+1) |
43 |
|
#define MAXRUN 1024 |
44 |
< |
#define cacheline(x) (((uae_u32)x)&TAGMASK) |
44 |
> |
#define cacheline(x) (((uintptr)x)&TAGMASK) |
45 |
|
|
46 |
|
extern uae_u8* start_pc_p; |
47 |
|
extern uae_u32 start_pc; |
80 |
|
#define USE_CHECKSUM_INFO 1 |
81 |
|
#endif |
82 |
|
|
83 |
+ |
/* Does flush_icache_range() only check for blocks falling in the requested range? */ |
84 |
+ |
#define LAZY_FLUSH_ICACHE_RANGE 0 |
85 |
+ |
|
86 |
|
#define USE_F_ALIAS 1 |
87 |
|
#define USE_OFFSET 1 |
88 |
|
#define COMP_DEBUG 1 |
124 |
|
|
125 |
|
#define KILLTHERAT 1 /* Set to 1 to avoid some partial_rat_stalls */ |
126 |
|
|
127 |
< |
/* Whether to preserve registers across calls to JIT compiled routines */ |
128 |
< |
#ifdef X86_ASSEMBLY |
126 |
< |
#define USE_PUSH_POP 0 |
127 |
> |
#if defined(__x86_64__) |
128 |
> |
#define N_REGS 16 /* really only 15, but they are numbered 0-3,5-15 */ |
129 |
|
#else |
128 |
– |
#define USE_PUSH_POP 1 |
129 |
– |
#endif |
130 |
– |
|
130 |
|
#define N_REGS 8 /* really only 7, but they are numbered 0,1,2,3,5,6,7 */ |
131 |
+ |
#endif |
132 |
|
#define N_FREGS 6 /* That leaves us two positions on the stack to play with */ |
133 |
|
|
134 |
|
/* Functions exposed to newcpu, or to what was moved from newcpu.c to |
341 |
|
DECLARE_MIDFUNC(setcc_m(IMM d, IMM cc)); |
342 |
|
DECLARE_MIDFUNC(cmov_l_rr(RW4 d, R4 s, IMM cc)); |
343 |
|
DECLARE_MIDFUNC(cmov_l_rm(RW4 d, IMM s, IMM cc)); |
344 |
< |
/* Set native Z flag only if register is zero */ |
345 |
< |
DECLARE_MIDFUNC(setzflg_l(RW4 r)); |
344 |
> |
DECLARE_MIDFUNC(bsf_l_rr(W4 d, R4 s)); |
345 |
|
DECLARE_MIDFUNC(pop_m(IMM d)); |
346 |
|
DECLARE_MIDFUNC(push_m(IMM d)); |
347 |
|
DECLARE_MIDFUNC(pop_l(W4 d)); |
508 |
|
extern void get_n_addr(int address, int dest, int tmp); |
509 |
|
extern void get_n_addr_jmp(int address, int dest, int tmp); |
510 |
|
extern void calc_disp_ea_020(int base, uae_u32 dp, int target, int tmp); |
511 |
+ |
/* Set native Z flag only if register is zero */ |
512 |
+ |
extern void set_zero(int r, int tmp); |
513 |
|
extern int kill_rodent(int r); |
514 |
|
extern void sync_m68k_pc(void); |
515 |
|
extern uae_u32 get_const(int r); |
523 |
|
struct blockinfo_t; |
524 |
|
|
525 |
|
typedef struct dep_t { |
526 |
< |
uintptr* jmp_off; |
526 |
> |
uae_u32* jmp_off; |
527 |
|
struct blockinfo_t* target; |
528 |
|
struct blockinfo_t* source; |
529 |
|
struct dep_t** prev_p; |