This way, jmp_next[0] means "taken" for both conditional jumps AND unconditional jumps. Currently, it has opposite meanings for the two cases.
Signed-off-by: Zhihui Zhang <zzhs...@gmail.com> --- target-i386/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 14b0298..7daa1a1 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -2430,10 +2430,10 @@ static inline void gen_jcc(DisasContext *s, int b, l1 = gen_new_label(); gen_jcc1(s, b, l1); - gen_goto_tb(s, 0, next_eip); + gen_goto_tb(s, 1, next_eip); gen_set_label(l1); - gen_goto_tb(s, 1, val); + gen_goto_tb(s, 0, val); s->is_jmp = DISAS_TB_JUMP; } else { l1 = gen_new_label(); -- 1.8.1.2