]> git.proxmox.com Git - qemu.git/commitdiff
PowerPC emulation bugfixes:
authorj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 16 Apr 2007 07:18:42 +0000 (07:18 +0000)
committerj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 16 Apr 2007 07:18:42 +0000 (07:18 +0000)
- don't generate multiple exit_tb at the end of conditional branches
- disable TRACE exception as it is not correct for embedded PowerPC.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2679 c046a42c-6fe2-441c-8c8c-71466251a162

target-ppc/translate.c

index fa533fe9e4edc20c59c3db2c4d14da75c256daed..0658fec288f2b36c4de727b3c606ffacac02b05b 100644 (file)
@@ -2806,11 +2806,11 @@ static inline void gen_bcond(DisasContext *ctx, int type)
 #endif
             gen_op_btest_T1(ctx->nip);
         gen_op_reset_T0();
-    }
  no_test:
-    if (ctx->singlestep_enabled)
-        gen_op_debug();
-    gen_op_exit_tb();
+        if (ctx->singlestep_enabled)
+            gen_op_debug();
+        gen_op_exit_tb();
+    }
     ctx->exception = EXCP_BRANCH;
 }
 
@@ -4725,7 +4725,7 @@ GEN_HANDLER(wrteei, 0x1F, 0x03, 0x05, 0x000EFC01, PPC_EMB_COMMON)
 #endif
 }
 
-/* PPC 440 specific instructions */
+/* PowerPC 440 specific instructions */
 /* dlmzb */
 GEN_HANDLER(dlmzb, 0x1F, 0x0E, 0x02, 0x00000000, PPC_440_SPEC)
 {
@@ -5838,6 +5838,7 @@ static inline int gen_intermediate_code_internal (CPUState *env,
         handler->count++;
 #endif
         /* Check trace mode exceptions */
+#if 0 // XXX: buggy on embedded PowerPC
         if (unlikely((msr_be && ctx.exception == EXCP_BRANCH) ||
                      /* Check in single step trace mode
                       * we need to stop except if:
@@ -5852,6 +5853,7 @@ static inline int gen_intermediate_code_internal (CPUState *env,
                       ctx.exception != EXCP_TRAP))) {
             RET_EXCP(ctxp, EXCP_TRACE, 0);
         }
+#endif
         /* if we reach a page boundary or are single stepping, stop
          * generation
          */