22 |
|
#include "memory.h" |
23 |
|
#include "readcpu.h" |
24 |
|
#include "newcpu.h" |
25 |
+ |
#include "fpu/fpu.h" |
26 |
|
|
27 |
|
#if defined(ENABLE_EXCLUSIVE_SPCFLAGS) && !defined(HAVE_HARDWARE_LOCKS) |
28 |
|
B2_mutex *spcflags_lock = NULL; |
51 |
|
int movem_index2[256]; |
52 |
|
int movem_next[256]; |
53 |
|
|
53 |
– |
int fpp_movem_index1[256]; |
54 |
– |
int fpp_movem_index2[256]; |
55 |
– |
int fpp_movem_next[256]; |
56 |
– |
|
54 |
|
cpuop_func *cpufunctbl[65536]; |
55 |
|
|
56 |
|
#define FLIGHT_RECORDER 0 |
232 |
|
movem_index2[i] = 7-j; |
233 |
|
movem_next[i] = i & (~(1 << j)); |
234 |
|
} |
238 |
– |
for (i = 0 ; i < 256 ; i++) { |
239 |
– |
int j; |
240 |
– |
for (j = 7 ; j >= 0 ; j--) { |
241 |
– |
if (i & (1 << j)) break; |
242 |
– |
} |
243 |
– |
fpp_movem_index1[i] = 7-j; |
244 |
– |
fpp_movem_index2[i] = j; |
245 |
– |
fpp_movem_next[i] = i & (~(1 << j)); |
246 |
– |
} |
235 |
|
#if COUNT_INSTRS |
236 |
|
{ |
237 |
|
FILE *f = fopen (icountfilename (), "r"); |
256 |
|
#if defined(ENABLE_EXCLUSIVE_SPCFLAGS) && !defined(HAVE_HARDWARE_LOCKS) |
257 |
|
spcflags_lock = B2_create_mutex(); |
258 |
|
#endif |
259 |
< |
|
272 |
< |
fpu_init (); |
273 |
< |
fpu_set_integral_fpu (CPUType == 4); |
259 |
> |
fpu_init(CPUType == 4); |
260 |
|
} |
261 |
|
|
262 |
|
void exit_m68k (void) |
1429 |
|
printf ("T=%d%d S=%d M=%d X=%d N=%d Z=%d V=%d C=%d IMASK=%d\n", |
1430 |
|
regs.t1, regs.t0, regs.s, regs.m, |
1431 |
|
GET_XFLG, GET_NFLG, GET_ZFLG, GET_VFLG, GET_CFLG, regs.intmask); |
1432 |
< |
for (i = 0; i < 8; i++){ |
1433 |
< |
printf ("FP%d: %g ", i, regs.fp[i]); |
1434 |
< |
if ((i & 3) == 3) printf ("\n"); |
1435 |
< |
} |
1450 |
< |
printf ("N=%d Z=%d I=%d NAN=%d\n", |
1451 |
< |
(regs.fpsr & 0x8000000) != 0, |
1452 |
< |
(regs.fpsr & 0x4000000) != 0, |
1453 |
< |
(regs.fpsr & 0x2000000) != 0, |
1454 |
< |
(regs.fpsr & 0x1000000) != 0); |
1455 |
< |
|
1432 |
> |
|
1433 |
> |
fpu_dump_registers(); |
1434 |
> |
fpu_dump_flags(); |
1435 |
> |
|
1436 |
|
m68k_disasm(m68k_getpc (), nextpc, 1); |
1437 |
|
if (nextpc) |
1438 |
|
printf ("next PC: %08lx\n", *nextpc); |