aboutsummaryrefslogtreecommitdiff
path: root/target-i386/translate.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2013-01-18 10:06:55 -0800
committerRichard Henderson <rth@twiddle.net>2013-02-18 15:03:58 -0800
commit891a5133f1637296c3823229180b5851132ed5f5 (patch)
treebd9bf8b757fe145e79ae64c648d7ec64019ee26f /target-i386/translate.c
parentdc259201f8b471f27136ffe50cc7019c8311ccb6 (diff)
target-i386: Update cc_op before TCG branches
Placing the CC_OP_DYNAMIC at the join is less effective than before the branch, as the branch will have forced global registers to their home locations. This way we have a chance to discard CC_SRC2 before it gets stored. Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-i386/translate.c')
-rw-r--r--target-i386/translate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/target-i386/translate.c b/target-i386/translate.c
index 948a04831a..7f2d65f250 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -1559,8 +1559,9 @@ static void gen_shift_rm_T1(DisasContext *s, int ot, int op1,
gen_op_mov_reg_T0(ot, op1);
}
- /* update eflags */
+ /* Update eflags data because we cannot predict flags afterward. */
gen_update_cc_op(s);
+ set_cc_op(s, CC_OP_DYNAMIC);
tcg_gen_mov_tl(t1, cpu_T[0]);
@@ -1587,7 +1588,6 @@ static void gen_shift_rm_T1(DisasContext *s, int ot, int op1,
}
gen_set_label(shift_label);
- set_cc_op(s, CC_OP_DYNAMIC); /* cannot predict flags after */
tcg_temp_free(t0);
tcg_temp_free(t1);
@@ -1972,8 +1972,9 @@ static void gen_shiftd_rm_T1(DisasContext *s, int ot, int op1,
gen_op_mov_reg_v(ot, op1, t0);
}
- /* update eflags */
+ /* Update eflags data because we cannot predict flags afterward. */
gen_update_cc_op(s);
+ set_cc_op(s, CC_OP_DYNAMIC);
label2 = gen_new_label();
tcg_gen_brcondi_tl(TCG_COND_EQ, t2, 0, label2);
@@ -1986,7 +1987,6 @@ static void gen_shiftd_rm_T1(DisasContext *s, int ot, int op1,
tcg_gen_movi_i32(cpu_cc_op, CC_OP_SHLB + ot);
}
gen_set_label(label2);
- set_cc_op(s, CC_OP_DYNAMIC); /* cannot predict flags after */
tcg_temp_free(t0);
tcg_temp_free(t1);