22 |
|
#include "memory.h" |
23 |
|
#include "readcpu.h" |
24 |
|
#include "newcpu.h" |
25 |
– |
#include "compiler.h" |
25 |
|
|
26 |
|
int quit_program = 0; |
27 |
|
int debugging = 0; |
206 |
|
do_merges (); |
207 |
|
|
208 |
|
build_cpufunctbl (); |
209 |
+ |
|
210 |
+ |
fpu_init (); |
211 |
+ |
fpu_set_integral_fpu (CPUType == 4); |
212 |
+ |
} |
213 |
+ |
|
214 |
+ |
void exit_m68k (void) |
215 |
+ |
{ |
216 |
+ |
fpu_exit (); |
217 |
|
} |
218 |
|
|
219 |
|
struct regstruct regs, lastint_regs; |
222 |
|
static long int m68kpc_offset; |
223 |
|
int lastint_no; |
224 |
|
|
225 |
+ |
#if REAL_ADDRESSING || DIRECT_ADDRESSING |
226 |
+ |
#define get_ibyte_1(o) get_byte(get_virtual_address(regs.pc_p) + (o) + 1) |
227 |
+ |
#define get_iword_1(o) get_word(get_virtual_address(regs.pc_p) + (o)) |
228 |
+ |
#define get_ilong_1(o) get_long(get_virtual_address(regs.pc_p) + (o)) |
229 |
+ |
#else |
230 |
|
#define get_ibyte_1(o) get_byte(regs.pc + (regs.pc_p - regs.pc_oldp) + (o) + 1) |
231 |
|
#define get_iword_1(o) get_word(regs.pc + (regs.pc_p - regs.pc_oldp) + (o)) |
232 |
|
#define get_ilong_1(o) get_long(regs.pc + (regs.pc_p - regs.pc_oldp) + (o)) |
233 |
+ |
#endif |
234 |
|
|
235 |
|
uae_s32 ShowEA (int reg, amodes mode, wordsizes size, char *buf) |
236 |
|
{ |
658 |
|
|
659 |
|
void Exception(int nr, uaecptr oldpc) |
660 |
|
{ |
648 |
– |
compiler_flush_jsr_stack(); |
661 |
|
MakeSR(); |
662 |
|
if (!regs.s) { |
663 |
|
regs.usp = m68k_areg(regs, 7); |
1059 |
|
regs.spcflags = 0; |
1060 |
|
regs.intmask = 7; |
1061 |
|
regs.vbr = regs.sfc = regs.dfc = 0; |
1062 |
< |
regs.fpcr = regs.fpsr = regs.fpiar = 0; |
1062 |
> |
/* gb-- moved into {fpp,fpu_x86}.cpp::fpu_init() |
1063 |
> |
regs.fpcr = regs.fpsr = regs.fpiar = 0; */ |
1064 |
> |
fpu_reset(); |
1065 |
|
} |
1066 |
|
|
1067 |
|
void REGPARAM2 op_illg (uae_u32 opcode) |
1068 |
|
{ |
1069 |
|
uaecptr pc = m68k_getpc (); |
1070 |
|
|
1057 |
– |
compiler_flush_jsr_stack (); |
1058 |
– |
|
1071 |
|
if ((opcode & 0xFF00) == 0x7100) { |
1072 |
|
struct M68kRegisters r; |
1073 |
|
int i; |
1168 |
|
static int do_specialties (void) |
1169 |
|
{ |
1170 |
|
/*n_spcinsns++;*/ |
1159 |
– |
run_compiled_code(); |
1171 |
|
if (regs.spcflags & SPCFLAG_DOTRACE) { |
1172 |
|
Exception (9,last_trace_ad); |
1173 |
|
} |