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

Comparing BasiliskII/src/uae_cpu/newcpu.cpp (file contents):
Revision 1.13 by gbeauche, 2002-09-01T15:17:13Z vs.
Revision 1.15 by gbeauche, 2002-09-13T12:50:56Z

# Line 22 | Line 22 | extern int intlev(void);       // From baisili
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) && defined(HAVE_PTHREADS)
28 < #include <pthread.h>
28 < pthread_mutex_t spcflags_lock = PTHREAD_MUTEX_INITIALIZER;
27 > #if defined(ENABLE_EXCLUSIVE_SPCFLAGS) && !defined(HAVE_HARDWARE_LOCKS)
28 > B2_mutex *spcflags_lock = NULL;
29   #endif
30  
31   #if ENABLE_MON
# Line 51 | Line 51 | int movem_index1[256];
51   int movem_index2[256];
52   int movem_next[256];
53  
54 int fpp_movem_index1[256];
55 int fpp_movem_index2[256];
56 int fpp_movem_next[256];
57
54   cpuop_func *cpufunctbl[65536];
55  
56   #define FLIGHT_RECORDER 0
# Line 236 | Line 232 | void init_m68k (void)
232          movem_index2[i] = 7-j;
233          movem_next[i] = i & (~(1 << j));
234      }
239    for (i = 0 ; i < 256 ; i++) {
240        int j;
241        for (j = 7 ; j >= 0 ; j--) {
242                if (i & (1 << j)) break;
243        }
244        fpp_movem_index1[i] = 7-j;
245        fpp_movem_index2[i] = j;
246        fpp_movem_next[i] = i & (~(1 << j));
247    }
235   #if COUNT_INSTRS
236      {
237          FILE *f = fopen (icountfilename (), "r");
# Line 265 | Line 252 | void init_m68k (void)
252      do_merges ();
253  
254      build_cpufunctbl ();
255 <    
256 <    fpu_init ();
257 <    fpu_set_integral_fpu (CPUType == 4);
255 >        
256 > #if defined(ENABLE_EXCLUSIVE_SPCFLAGS) && !defined(HAVE_HARDWARE_LOCKS)
257 >        spcflags_lock = B2_create_mutex();
258 > #endif
259 >    fpu_init(CPUType == 4);
260   }
261  
262   void exit_m68k (void)
263   {
264          fpu_exit ();
265 + #if defined(ENABLE_EXCLUSIVE_SPCFLAGS) && !defined(HAVE_HARDWARE_LOCKS)
266 +        B2_delete_mutex(spcflags_lock);
267 + #endif
268   }
269  
270   struct regstruct regs, lastint_regs;
# Line 1437 | Line 1429 | void m68k_dumpstate (uaecptr *nextpc)
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 <    }
1444 <    printf ("N=%d Z=%d I=%d NAN=%d\n",
1445 <                (regs.fpsr & 0x8000000) != 0,
1446 <                (regs.fpsr & 0x4000000) != 0,
1447 <                (regs.fpsr & 0x2000000) != 0,
1448 <                (regs.fpsr & 0x1000000) != 0);
1449 <
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);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines