added cpu_model parameter to cpu_init()
[qemu] / target-m68k / translate.c
index 9fa4602..499f053 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  m68k translation
- * 
+ *
  *  Copyright (c) 2005-2007 CodeSourcery
  *  Written by Paul Brook
  *
@@ -1639,7 +1639,7 @@ DISAS_INSN(branch)
     uint32_t base;
     int op;
     int l1;
-    
+
     base = s->pc;
     op = (insn >> 8) & 0xf;
     offset = (int8_t)insn;
@@ -2190,7 +2190,7 @@ DISAS_INSN(fpu)
         }
         DEST_EA(insn, OS_LONG, res, NULL);
         break;
-    case 6: /* fmovem */ 
+    case 6: /* fmovem */
     case 7:
         {
         int addr;
@@ -2323,7 +2323,7 @@ DISAS_INSN(fpu)
         tmp = gen_new_qreg(QMODE_F32);
         gen_op_f64_to_f32(tmp, res);
         gen_op_f32_to_f64(res, tmp);
-    } 
+    }
     gen_op_fp_result(res);
     if (dest) {
         gen_op_movf64(dest, res);
@@ -3065,7 +3065,7 @@ static void expand_op_addx_cc(qOP *qop)
     int arg0 = qop->args[0];
     int arg1 = qop->args[1];
     int l1, l2;
-    
+
     gen_op_add32 (arg0, arg0, arg1);
     l1 = gen_new_label();
     l2 = gen_new_label();
@@ -3159,7 +3159,7 @@ gen_intermediate_code_internal(CPUState *env, TranslationBlock *tb,
 
     /* generate intermediate code */
     pc_start = tb->pc;
-       
+
     dc->tb = tb;
 
     gen_opc_ptr = gen_opc_buf;
@@ -3260,7 +3260,6 @@ gen_intermediate_code_internal(CPUState *env, TranslationBlock *tb,
         lj++;
         while (lj <= j)
             gen_opc_instr_start[lj++] = 0;
-        tb->size = 0;
     } else {
         tb->size = dc->pc - pc_start;
     }
@@ -3280,39 +3279,7 @@ int gen_intermediate_code_pc(CPUState *env, TranslationBlock *tb)
     return gen_intermediate_code_internal(env, tb, 1);
 }
 
-void cpu_reset(CPUM68KState *env)
-{
-    memset(env, 0, offsetof(CPUM68KState, breakpoints));
-#if !defined (CONFIG_USER_ONLY)
-    env->sr = 0x2700;
-#endif
-    m68k_switch_sp(env);
-    /* ??? FP regs should be initialized to NaN.  */
-    env->cc_op = CC_OP_FLAGS;
-    /* TODO: We should set PC from the interrupt vector.  */
-    env->pc = 0;
-    tlb_flush(env, 1);
-}
-
-CPUM68KState *cpu_m68k_init(void)
-{
-    CPUM68KState *env;
-
-    env = malloc(sizeof(CPUM68KState));
-    if (!env)
-        return NULL;
-    cpu_exec_init(env);
-
-    cpu_reset(env);
-    return env;
-}
-
-void cpu_m68k_close(CPUM68KState *env)
-{
-    free(env);
-}
-
-void cpu_dump_state(CPUState *env, FILE *f, 
+void cpu_dump_state(CPUState *env, FILE *f,
                     int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
                     int flags)
 {