]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/i386: no single-step exception after MOV or POP SS
authorPaolo Bonzini <pbonzini@redhat.com>
Sat, 25 May 2024 08:03:22 +0000 (10:03 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Mon, 27 May 2024 11:27:37 +0000 (14:27 +0300)
Intel SDM 18.3.1.4 "If an occurrence of the MOV or POP instruction
loads the SS register executes with EFLAGS.TF = 1, no single-step debug
exception occurs following the MOV or POP instruction."

Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit f0f0136abba688a6516647a79cc91e03fad6d5d7)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/i386/tcg/translate.c

index 981c6b4de7a8e97e254c9a114f5e506277316ce6..063727c912fae1a6ac793d771f19bc01baf4bfec 100644 (file)
@@ -2795,7 +2795,7 @@ do_gen_eob_worker(DisasContext *s, bool inhibit, bool recheck_tf, bool jr)
     if (recheck_tf) {
         gen_helper_rechecking_single_step(tcg_env);
         tcg_gen_exit_tb(NULL, 0);
-    } else if (s->flags & HF_TF_MASK) {
+    } else if ((s->flags & HF_TF_MASK) && !inhibit) {
         gen_helper_single_step(tcg_env);
     } else if (jr &&
                /* give irqs a chance to happen */