9 |
|
#ifndef NEWCPU_H |
10 |
|
#define NEWCPU_H |
11 |
|
|
12 |
+ |
#ifndef FLIGHT_RECORDER |
13 |
+ |
#define FLIGHT_RECORDER 0 |
14 |
+ |
#endif |
15 |
+ |
|
16 |
|
#include "m68k.h" |
17 |
|
#include "readcpu.h" |
18 |
|
#include "spcflags.h" |
26 |
|
|
27 |
|
extern int broken_in; |
28 |
|
|
25 |
– |
/* Control flow information */ |
26 |
– |
#define CFLOW_NORMAL 0 |
27 |
– |
#define CFLOW_BRANCH 1 |
28 |
– |
#define CFLOW_JUMP 2 |
29 |
– |
#define CFLOW_TRAP CFLOW_JUMP |
30 |
– |
#define CFLOW_RETURN 3 |
31 |
– |
#define CFLOW_SPCFLAGS 32 /* some spcflags are set */ |
32 |
– |
#define CFLOW_EXEC_RETURN 64 /* must exit from the execution loop */ |
33 |
– |
|
34 |
– |
#define cpuop_rettype void |
35 |
– |
#define cpuop_return(v) do { (v); return; } while (0) |
36 |
– |
|
29 |
|
#ifdef X86_ASSEMBLY |
30 |
|
/* This hack seems to force all register saves (pushl %reg) to be moved to the |
31 |
|
begining of the function, thus making it possible to cpuopti to remove them |
37 |
|
#endif |
38 |
|
|
39 |
|
#define cpuop_begin() do { cpuop_tag("begin"); } while (0) |
40 |
< |
#define cpuop_end(cflow) do { cpuop_tag("end"); cpuop_return(cflow); } while (0) |
40 |
> |
#define cpuop_end() do { cpuop_tag("end"); } while (0) |
41 |
|
|
42 |
< |
typedef cpuop_rettype REGPARAM2 cpuop_func (uae_u32) REGPARAM; |
42 |
> |
typedef void REGPARAM2 cpuop_func (uae_u32) REGPARAM; |
43 |
|
|
44 |
|
struct cputbl { |
45 |
|
cpuop_func *handler; |
47 |
|
uae_u16 opcode; |
48 |
|
}; |
49 |
|
|
50 |
< |
extern cpuop_rettype REGPARAM2 op_illg (uae_u32) REGPARAM; |
50 |
> |
extern cpuop_func *cpufunctbl[65536] ASM_SYM_FOR_FUNC ("cpufunctbl"); |
51 |
> |
|
52 |
> |
#if USE_JIT |
53 |
> |
typedef void compop_func (uae_u32) REGPARAM; |
54 |
> |
|
55 |
> |
struct comptbl { |
56 |
> |
compop_func *handler; |
57 |
> |
uae_u32 specific; |
58 |
> |
uae_u32 opcode; |
59 |
> |
}; |
60 |
> |
#endif |
61 |
> |
|
62 |
> |
extern void REGPARAM2 op_illg (uae_u32) REGPARAM; |
63 |
|
|
64 |
|
typedef char flagtype; |
65 |
|
|
281 |
|
/* 68000 slow but compatible. */ |
282 |
|
extern struct cputbl op_smalltbl_4_ff[]; |
283 |
|
|
284 |
+ |
#if FLIGHT_RECORDER |
285 |
+ |
extern void m68k_record_step(uaecptr) REGPARAM; |
286 |
+ |
#endif |
287 |
|
extern void m68k_do_execute(void); |
288 |
|
extern void m68k_execute(void); |
289 |
+ |
#if USE_JIT |
290 |
+ |
#if defined(X86_ASSEMBLY) || defined(X86_64_ASSEMBLY) |
291 |
+ |
/* This is generated code */ |
292 |
+ |
extern void (*m68k_compile_execute)(void); |
293 |
+ |
#else |
294 |
+ |
extern void m68k_do_compile_execute(void); |
295 |
+ |
extern void m68k_compile_execute(void); |
296 |
+ |
#endif |
297 |
+ |
#endif |
298 |
|
|
299 |
|
#endif /* NEWCPU_H */ |