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.3 by cebix, 1999-10-28T16:00:28Z vs.
Revision 1.4 by cebix, 1999-10-31T23:18:42Z

# Line 111 | Line 111 | static __inline__ unsigned int cft_map (
111   #endif
112   }
113  
114 < static unsigned long REGPARAM2 op_illg_1 (uae_u32 opcode) REGPARAM;
114 > static void REGPARAM2 op_illg_1 (uae_u32 opcode) REGPARAM;
115  
116 < static unsigned long REGPARAM2 op_illg_1 (uae_u32 opcode)
116 > static void REGPARAM2 op_illg_1 (uae_u32 opcode)
117   {
118      op_illg (cft_map (opcode));
119    return 4;
119   }
120  
121   static void build_cpufunctbl (void)
# Line 1051 | Line 1050 | void m68k_reset (void)
1050      regs.fpcr = regs.fpsr = regs.fpiar = 0;
1051   }
1052  
1053 < unsigned long REGPARAM2 op_illg (uae_u32 opcode)
1053 > void REGPARAM2 op_illg (uae_u32 opcode)
1054   {
1055      uaecptr pc = m68k_getpc ();
1056  
# Line 1065 | Line 1064 | unsigned long REGPARAM2 op_illg (uae_u32
1064                  if (opcode == M68K_EXEC_RETURN) {
1065                          regs.spcflags |= SPCFLAG_BRK;
1066                          quit_program = 1;
1067 <                        return 4;
1067 >                        return;
1068                  }
1069  
1070                  // Call EMUL_OP opcode
# Line 1084 | Line 1083 | unsigned long REGPARAM2 op_illg (uae_u32
1083                  MakeFromSR();
1084                  m68k_incpc(2);
1085                  fill_prefetch_0 ();
1086 <                return 4;
1086 >                return;
1087          }
1088  
1089      if ((opcode & 0xF000) == 0xA000) {
1090          Exception(0xA,0);
1091 <        return 4;
1091 >        return;
1092      }
1093  
1094 <    write_log ("Illegal instruction: %04x at %08lx\n", opcode, pc);
1094 > //    write_log ("Illegal instruction: %04x at %08lx\n", opcode, pc);
1095  
1096      if ((opcode & 0xF000) == 0xF000) {
1097          Exception(0xB,0);
1098 <        return 4;
1098 >        return;
1099      }
1100  
1101 +    write_log ("Illegal instruction: %04x at %08lx\n", opcode, pc);
1102 +
1103      Exception (4,0);
1103    return 4;
1104   }
1105  
1106   void mmu_op(uae_u32 opcode, uae_u16 extra)
# Line 1195 | Line 1195 | static int do_specialties (void)
1195  
1196   static void m68k_run_1 (void)
1197   {
1198 <    for (;;) {
1199 <        int cycles;
1200 <        uae_u32 opcode = GET_OPCODE;
1201 < #if 0
1202 <        if (get_ilong (0) != do_get_mem_long (&regs.prefetch)) {
1203 <            debugging = 1;
1204 <            return;
1205 <        }
1206 < #endif
1207 <        /* assert (!regs.stopped && !(regs.spcflags & SPCFLAG_STOP)); */
1208 < /*      regs_backup[backup_pointer = (backup_pointer + 1) % 16] = regs;*/
1209 < #if COUNT_INSTRS == 2
1210 <        if (table68k[cft_map (opcode)].handler != -1)
1211 <            instrcount[table68k[cft_map (opcode)].handler]++;
1212 < #elif COUNT_INSTRS == 1
1213 <        instrcount[opcode]++;
1214 < #endif
1215 < #if defined(X86_ASSEMBLYxxx)
1216 <        __asm__ __volatile__("\tcall *%%ebx"
1217 <                             : "=&a" (cycles) : "b" (cpufunctbl[opcode]), "0" (opcode)
1218 <                             : "%edx", "%ecx",
1219 <                             "%esi", "%edi", "%ebp", "memory", "cc");
1220 < #else
1221 <        cycles = (*cpufunctbl[opcode])(opcode);
1222 < #endif
1223 <        /*n_insns++;*/
1224 <        if (regs.spcflags) {
1225 <            if (do_specialties ())
1226 <                return;
1198 >        for (;;) {
1199 >                uae_u32 opcode = GET_OPCODE;
1200 >                (*cpufunctbl[opcode])(opcode);
1201 >                if (regs.spcflags) {
1202 >                        if (do_specialties())
1203 >                                return;
1204 >                }
1205          }
1228    }
1206   }
1207  
1231 #ifdef X86_ASSEMBLYxxx
1232 static __inline__ void m68k_run1 (void)
1233 {
1234    /* Work around compiler bug: GCC doesn't push %ebp in m68k_run_1. */
1235    __asm__ __volatile__ ("pushl %%ebp\n\tcall *%0\n\tpopl %%ebp" : : "r" (m68k_run_1) : "%eax", "%edx", "%ecx", "memory", "cc");
1236 }
1237 #else
1208   #define m68k_run1 m68k_run_1
1239 #endif
1209  
1210   int in_m68k_go = 0;
1211  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines