From e661e2d7a37bf8db3b1aea2a25a945d31401eb09 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Sat, 22 Nov 2025 22:59:01 +0100 Subject: [PATCH] target/i386/tcg: update cc_op after PUSHF PUSHF already needs to compute the full eflags; set the cc_op to CC_OP_EFLAGS to avoid duplicate computation in subsequent code. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/emit.c.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/i386/tcg/emit.c.inc b/target/i386/tcg/emit.c.inc index 1a7fab9333..22e53f5b00 100644 --- a/target/i386/tcg/emit.c.inc +++ b/target/i386/tcg/emit.c.inc @@ -3250,6 +3250,8 @@ static void gen_PUSHF(DisasContext *s, X86DecodedInsn *decode) gen_update_cc_op(s); gen_helper_read_eflags(s->T0, tcg_env); gen_push_v(s, s->T0); + decode->cc_src = s->T0; + decode->cc_op = CC_OP_EFLAGS; } static MemOp gen_shift_count(DisasContext *s, X86DecodedInsn *decode,