Commit 89cc7382030bfd7b1f1c3d826c26f17c7bd761a2

Authored by edgar_igl
1 parent f451387a

CRIS: Correct condition for when to apply fast move flags evaluation. Correct si…

…ngle-stepping over branches.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4944 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 3 additions and 2 deletions
target-cris/translate.c
@@ -979,7 +979,7 @@ static void gen_tst_cc (DisasContext *dc, int cond) @@ -979,7 +979,7 @@ static void gen_tst_cc (DisasContext *dc, int cond)
979 * code is true. 979 * code is true.
980 */ 980 */
981 arith_opt = arith_cc(dc) && !dc->flags_uptodate; 981 arith_opt = arith_cc(dc) && !dc->flags_uptodate;
982 - move_opt = (dc->cc_op == CC_OP_MOVE) && !dc->flags_uptodate; 982 + move_opt = (dc->cc_op == CC_OP_MOVE) && dc->flags_uptodate;
983 switch (cond) { 983 switch (cond) {
984 case CC_EQ: 984 case CC_EQ:
985 if (arith_opt || move_opt) { 985 if (arith_opt || move_opt) {
@@ -3192,7 +3192,8 @@ gen_intermediate_code_internal(CPUState *env, TranslationBlock *tb, @@ -3192,7 +3192,8 @@ gen_intermediate_code_internal(CPUState *env, TranslationBlock *tb,
3192 cris_evaluate_flags (dc); 3192 cris_evaluate_flags (dc);
3193 3193
3194 if (unlikely(env->singlestep_enabled)) { 3194 if (unlikely(env->singlestep_enabled)) {
3195 - tcg_gen_movi_tl(env_pc, npc); 3195 + if (dc->is_jmp == DISAS_NEXT)
  3196 + tcg_gen_movi_tl(env_pc, npc);
3196 t_gen_raise_exception(EXCP_DEBUG); 3197 t_gen_raise_exception(EXCP_DEBUG);
3197 } else { 3198 } else {
3198 switch(dc->is_jmp) { 3199 switch(dc->is_jmp) {