From 360e9c60e1feb4a93e7e43f30858e38eac2d35f2 Mon Sep 17 00:00:00 2001 From: dmarxn <47157608+dmarxn@users.noreply.github.com> Date: Thu, 7 Feb 2019 17:10:01 +0200 Subject: [PATCH] changed cpu_compue_eflags to use the updated eflags variable. Otherwise, cli/sti and popfl may break, as we get the non-updated eflags (#1057) --- qemu/target-i386/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/target-i386/cpu.h b/qemu/target-i386/cpu.h index 920552e7..a4f400cf 100644 --- a/qemu/target-i386/cpu.h +++ b/qemu/target-i386/cpu.h @@ -1317,7 +1317,7 @@ void update_fp_status(CPUX86State *env); static inline uint32_t cpu_compute_eflags(CPUX86State *env) { - return (env->eflags0 & ~(CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C | DF_MASK)) | cpu_cc_compute_all(env, CC_OP) | (env->df & DF_MASK); + return (env->eflags & ~(CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C | DF_MASK)) | cpu_cc_compute_all(env, CC_OP) | (env->df & DF_MASK); } /* NOTE: the translator must set DisasContext.cc_op to CC_OP_EFLAGS