Commit df5c2ef7cd for qemu.org
commit df5c2ef7cd3ee3817c86b952e380dd56f563a6a1
Author: Paolo Bonzini <pbonzini@redhat.com>
Date: Wed Dec 31 12:42:54 2025 +0100
target/i386/tcg: remove dead code
Remove dead code; it arose when I noticed that, because 0x3? opcodes do
have a pop, case 0x32 works just fine as fcomp (even though 0x?2 is fcom):
there is no need to hack the op to 0x03.
Reported by Coverity as CID 1643922.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index 7c444d5006..460848e422 100644
--- a/target/i386/tcg/translate.c
+++ b/target/i386/tcg/translate.c
@@ -2543,9 +2543,6 @@ static void gen_x87(DisasContext *s, X86DecodedInsn *decode)
break;
}
break;
- /* map to fcomp; op & 7 == 2 would not pop */
- op = 0x03;
- /* fallthrough */
case 0x00 ... 0x07: /* fxxx st, sti */
case 0x22 ... 0x23: /* fcom2 and fcomp3, undocumented ops */
case 0x32: /* fcomp5, undocumented op */