[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 07/57] target-i386: move carry computation for inc/d
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 07/57] target-i386: move carry computation for inc/dec closer to gen_op_set_cc_op |
Date: |
Wed, 23 Jan 2013 20:02:51 -0800 |
From: Paolo Bonzini <address@hidden>
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 <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
---
target-i386/translate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target-i386/translate.c b/target-i386/translate.c
index 84da28f..18b39e9 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]);
}
--
1.7.11.7
- [Qemu-devel] [PATCH 00/57] target-i386 eflags cleanup and bmi/adx extensions, Richard Henderson, 2013/01/23
- [Qemu-devel] [PATCH 01/57] test-i386: QEMU_PACKED is not defined here, Richard Henderson, 2013/01/23
- [Qemu-devel] [PATCH 02/57] test-i386: make it compile with a recent gcc, Richard Henderson, 2013/01/23
- [Qemu-devel] [PATCH 04/57] target-i386: introduce gen_ext_tl, Richard Henderson, 2013/01/23
- [Qemu-devel] [PATCH 03/57] target-i386: use OT_* consistently, Richard Henderson, 2013/01/23
- [Qemu-devel] [PATCH 05/57] target-i386: factor setting of s->cc_op handling for string functions, Richard Henderson, 2013/01/23
- [Qemu-devel] [PATCH 08/57] target-i386: move eflags computation closer to gen_op_set_cc_op, Richard Henderson, 2013/01/23
- [Qemu-devel] [PATCH 06/57] target-i386: drop cc_op argument of gen_jcc1, Richard Henderson, 2013/01/23
- [Qemu-devel] [PATCH 07/57] target-i386: move carry computation for inc/dec closer to gen_op_set_cc_op,
Richard Henderson <=
- [Qemu-devel] [PATCH 12/57] target-i386: factor gen_op_set_cc_op/tcg_gen_discard_tl around computing flags, Richard Henderson, 2013/01/23
- [Qemu-devel] [PATCH 10/57] target-i386: clean up sahf, Richard Henderson, 2013/01/23
- [Qemu-devel] [PATCH 09/57] target-i386: compute eflags outside rcl/rcr helper, Richard Henderson, 2013/01/23
- [Qemu-devel] [PATCH 11/57] target-i386: use gen_jcc1 to compile loopz, Richard Henderson, 2013/01/23
- [Qemu-devel] [PATCH 13/57] target-i386: Name the cc_op enumeration, Richard Henderson, 2013/01/23
- [Qemu-devel] [PATCH 14/57] target-i386: Introduce set_cc_op, Richard Henderson, 2013/01/23
- [Qemu-devel] [PATCH 15/57] target-i386: Don't clobber s->cc_op in gen_update_cc_op, Richard Henderson, 2013/01/23
- [Qemu-devel] [PATCH 18/57] target-i386: do not compute eflags multiple times consecutively, Richard Henderson, 2013/01/23
- [Qemu-devel] [PATCH 17/57] target-i386: add helper functions to get other flags, Richard Henderson, 2013/01/23
- [Qemu-devel] [PATCH 16/57] target-i386: Use gen_update_cc_op everywhere, Richard Henderson, 2013/01/23