target/i386: Save cc_op before loop insns
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 20 Jul 2020 15:30:40 +0000 (08:30 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Fri, 24 Jul 2020 21:29:35 +0000 (14:29 -0700)
We forgot to update cc_op before these branch insns,
which lead to losing track of the current eflags.

Buglink: https://bugs.launchpad.net/qemu/+bug/1888165
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200720154028.477457-1-richard.henderson@linaro.org>

target/i386/translate.c

index a1d31f09c139bbfe96df483731bf5a16c71a2bfc..caea6f5fb11fdd54e9e6164907283a092300b228 100644 (file)
@@ -7148,6 +7148,7 @@ static target_ulong disas_insn(DisasContext *s, CPUState *cpu)
             l1 = gen_new_label();
             l2 = gen_new_label();
             l3 = gen_new_label();
+            gen_update_cc_op(s);
             b &= 3;
             switch(b) {
             case 0: /* loopnz */