Commit 08e46e54ea498b7e9a2a415435844f21c17064fc
1 parent
95d1f3ed
PowerPC emulation bugfixes:
- 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
Showing
1 changed file
with
7 additions
and
5 deletions
target-ppc/translate.c
... | ... | @@ -2806,11 +2806,11 @@ static inline void gen_bcond(DisasContext *ctx, int type) |
2806 | 2806 | #endif |
2807 | 2807 | gen_op_btest_T1(ctx->nip); |
2808 | 2808 | gen_op_reset_T0(); |
2809 | - } | |
2810 | 2809 | no_test: |
2811 | - if (ctx->singlestep_enabled) | |
2812 | - gen_op_debug(); | |
2813 | - gen_op_exit_tb(); | |
2810 | + if (ctx->singlestep_enabled) | |
2811 | + gen_op_debug(); | |
2812 | + gen_op_exit_tb(); | |
2813 | + } | |
2814 | 2814 | ctx->exception = EXCP_BRANCH; |
2815 | 2815 | } |
2816 | 2816 | |
... | ... | @@ -4725,7 +4725,7 @@ GEN_HANDLER(wrteei, 0x1F, 0x03, 0x05, 0x000EFC01, PPC_EMB_COMMON) |
4725 | 4725 | #endif |
4726 | 4726 | } |
4727 | 4727 | |
4728 | -/* PPC 440 specific instructions */ | |
4728 | +/* PowerPC 440 specific instructions */ | |
4729 | 4729 | /* dlmzb */ |
4730 | 4730 | GEN_HANDLER(dlmzb, 0x1F, 0x0E, 0x02, 0x00000000, PPC_440_SPEC) |
4731 | 4731 | { |
... | ... | @@ -5838,6 +5838,7 @@ static inline int gen_intermediate_code_internal (CPUState *env, |
5838 | 5838 | handler->count++; |
5839 | 5839 | #endif |
5840 | 5840 | /* Check trace mode exceptions */ |
5841 | +#if 0 // XXX: buggy on embedded PowerPC | |
5841 | 5842 | if (unlikely((msr_be && ctx.exception == EXCP_BRANCH) || |
5842 | 5843 | /* Check in single step trace mode |
5843 | 5844 | * we need to stop except if: |
... | ... | @@ -5852,6 +5853,7 @@ static inline int gen_intermediate_code_internal (CPUState *env, |
5852 | 5853 | ctx.exception != EXCP_TRAP))) { |
5853 | 5854 | RET_EXCP(ctxp, EXCP_TRACE, 0); |
5854 | 5855 | } |
5856 | +#endif | |
5855 | 5857 | /* if we reach a page boundary or are single stepping, stop |
5856 | 5858 | * generation |
5857 | 5859 | */ | ... | ... |