ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/uae_cpu/newcpu.h
(Generate patch)

Comparing BasiliskII/src/uae_cpu/newcpu.h (file contents):
Revision 1.8 by gbeauche, 2002-09-01T15:17:13Z vs.
Revision 1.17 by asvitkine, 2012-03-30T01:25:46Z

# Line 1 | Line 1
1 < /*
2 <  * UAE - The Un*x Amiga Emulator
3 <  *
4 <  * MC68000 emulation
5 <  *
6 <  * Copyright 1995 Bernd Schmidt
7 <  */
1 > /*
2 > * UAE - The Un*x Amiga Emulator
3 > *
4 > * MC68000 emulation
5 > *
6 > * Copyright 1995 Bernd Schmidt
7 > *
8 > * This program is free software; you can redistribute it and/or modify
9 > * it under the terms of the GNU General Public License as published by
10 > * the Free Software Foundation; either version 2 of the License, or
11 > * (at your option) any later version.
12 > *
13 > * This program is distributed in the hope that it will be useful,
14 > * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 > * GNU General Public License for more details.
17 > *
18 > * You should have received a copy of the GNU General Public License
19 > * along with this program; if not, write to the Free Software
20 > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21 > */
22  
23   #ifndef NEWCPU_H
24   #define NEWCPU_H
25  
26 + #ifndef FLIGHT_RECORDER
27 + #define FLIGHT_RECORDER 0
28 + #endif
29 +
30   #include "m68k.h"
31   #include "readcpu.h"
32   #include "spcflags.h"
# Line 20 | Line 38 | extern int movem_index1[256];
38   extern int movem_index2[256];
39   extern int movem_next[256];
40  
23 extern int fpp_movem_index1[256];
24 extern int fpp_movem_index2[256];
25 extern int fpp_movem_next[256];
26
41   extern int broken_in;
42  
29 /* Control flow information */
30 #define CFLOW_NORMAL            0
31 #define CFLOW_BRANCH            1
32 #define CFLOW_JUMP                      2
33 #define CFLOW_TRAP                      CFLOW_JUMP
34 #define CFLOW_RETURN            3
35 #define CFLOW_SPCFLAGS          32      /* some spcflags are set */
36 #define CFLOW_EXEC_RETURN       64      /* must exit from the execution loop */
37
38 #define cpuop_rettype           void
39 #define cpuop_return(v)         do { (v); return; } while (0)
40
43   #ifdef X86_ASSEMBLY
44   /* This hack seems to force all register saves (pushl %reg) to be moved to the
45     begining of the function, thus making it possible to cpuopti to remove them
# Line 49 | Line 51 | extern int broken_in;
51   #endif
52  
53   #define cpuop_begin()           do { cpuop_tag("begin"); } while (0)
54 < #define cpuop_end(cflow)        do { cpuop_tag("end"); cpuop_return(cflow); } while (0)
54 > #define cpuop_end()                     do { cpuop_tag("end"); } while (0)
55  
56 < typedef cpuop_rettype REGPARAM2 cpuop_func (uae_u32) REGPARAM;
56 > typedef void REGPARAM2 cpuop_func (uae_u32) REGPARAM;
57  
58   struct cputbl {
59      cpuop_func *handler;
# Line 59 | Line 61 | struct cputbl {
61      uae_u16 opcode;
62   };
63  
64 < extern cpuop_rettype REGPARAM2 op_illg (uae_u32) REGPARAM;
64 > extern cpuop_func *cpufunctbl[65536] ASM_SYM_FOR_FUNC ("cpufunctbl");
65 >
66 > #if USE_JIT
67 > typedef void compop_func (uae_u32) REGPARAM;
68 >
69 > struct comptbl {
70 >    compop_func *handler;
71 >        uae_u32         specific;
72 >        uae_u32         opcode;
73 > };
74 > #endif
75 >
76 > extern void REGPARAM2 op_illg (uae_u32) REGPARAM;
77  
78   typedef char flagtype;
79  
# Line 83 | Line 97 | struct regstruct {
97      flagtype    x;
98      flagtype    stopped;
99  
86    double              fp[8];
87    uae_u32             fpcr,fpsr,fpiar;
88
100   #if USE_PREFETCH_BUFFER
101      /* Fellow sources say this is 4 longwords. That's impossible. It needs
102       * to be at least a longword. The HRM has some cryptic comment about two
# Line 264 | Line 275 | extern int m68k_do_specialties(void);
275  
276   extern void mmu_op (uae_u32, uae_u16);
277  
267 extern void fpp_opp (uae_u32, uae_u16);
268 extern void fdbcc_opp (uae_u32, uae_u16);
269 extern void fscc_opp (uae_u32, uae_u16);
270 extern void ftrapcc_opp (uae_u32,uaecptr);
271 extern void fbcc_opp (uae_u32, uaecptr, uae_u32);
272 extern void fsave_opp (uae_u32);
273 extern void frestore_opp (uae_u32);
274
275 extern void fpu_set_integral_fpu (bool is_integral);
276 extern void fpu_init (void);
277 extern void fpu_exit (void);
278 extern void fpu_reset (void);
279
278   /* Opcode of faulting instruction */
279   extern uae_u16 last_op_for_exception_3;
280   /* PC at fault time */
# Line 297 | Line 295 | extern struct cputbl op_smalltbl_3_ff[];
295   /* 68000 slow but compatible.  */
296   extern struct cputbl op_smalltbl_4_ff[];
297  
298 + #if FLIGHT_RECORDER
299 + extern void m68k_record_step(uaecptr) REGPARAM;
300 + #endif
301   extern void m68k_do_execute(void);
302   extern void m68k_execute(void);
303 + #if USE_JIT
304 + extern void m68k_compile_execute(void);
305 + #endif
306 + #ifdef USE_CPU_EMUL_SERVICES
307 + extern int32 emulated_ticks;
308 + extern void cpu_do_check_ticks(void);
309 +
310 + static inline void cpu_check_ticks(void)
311 + {
312 +        if (--emulated_ticks <= 0)
313 +                cpu_do_check_ticks();
314 + }
315 + #else
316 + #define cpu_check_ticks()
317 + #define cpu_do_check_ticks()
318 + #endif
319  
320   #endif /* NEWCPU_H */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines