diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-10-06 00:18:55 +0200 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2013-02-18 15:03:55 -0800 |
commit | 52320e15dbb0c2531501a924972e63cdb59742a7 (patch) | |
tree | ac70efbb48eb01d3180299e0aadbeac36c34684b /target-i386/translate.c | |
parent | b27fc131fe8dc18924904e4dd0b82dfd77dc51c7 (diff) | |
download | hqemu-52320e15dbb0c2531501a924972e63cdb59742a7.zip hqemu-52320e15dbb0c2531501a924972e63cdb59742a7.tar.gz |
target-i386: move carry computation for inc/dec closer to gen_op_set_cc_op
This ensures the invariant that cpu_cc_op matches s->cc_op when calling
the helpers. The next patches need this because gen_compute_eflags and
gen_compute_eflags_c will take care of setting cpu_cc_op.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-i386/translate.c')
-rw-r--r-- | target-i386/translate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target-i386/translate.c b/target-i386/translate.c index 48a3255..ed373c3 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -1373,6 +1373,7 @@ static void gen_inc(DisasContext *s1, int ot, int d, int c) gen_op_ld_T0_A0(ot + s1->mem_index); if (s1->cc_op != CC_OP_DYNAMIC) gen_op_set_cc_op(s1->cc_op); + gen_compute_eflags_c(cpu_cc_src); if (c > 0) { tcg_gen_addi_tl(cpu_T[0], cpu_T[0], 1); s1->cc_op = CC_OP_INCB + ot; @@ -1384,7 +1385,6 @@ static void gen_inc(DisasContext *s1, int ot, int d, int c) gen_op_mov_reg_T0(ot, d); else gen_op_st_T0_A0(ot + s1->mem_index); - gen_compute_eflags_c(cpu_cc_src); tcg_gen_mov_tl(cpu_cc_dst, cpu_T[0]); } |