34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
|
|
From 216483f975d268d1bba93e5a44c06b080f515a97 Mon Sep 17 00:00:00 2001
|
||
|
|
From: liujing <liujing_yewu@cmss.chinamobile.com>
|
||
|
|
Date: Wed, 18 Sep 2024 16:58:59 +0800
|
||
|
|
Subject: [PATCH] target/i386: REPZ and REPNZ are mutually exclusive
|
||
|
|
|
||
|
|
The later prefix wins if both are present, make it show in s->prefix too.
|
||
|
|
|
||
|
|
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
|
||
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
||
|
|
Signed-off-by: Liu Jing <liujing_yewu@cmss.chinamobile.com>
|
||
|
|
---
|
||
|
|
target/i386/tcg/translate.c | 2 ++
|
||
|
|
1 file changed, 2 insertions(+)
|
||
|
|
|
||
|
|
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
|
||
|
|
index 82f77b52fb..0b035df68e 100644
|
||
|
|
--- a/target/i386/tcg/translate.c
|
||
|
|
+++ b/target/i386/tcg/translate.c
|
||
|
|
@@ -4587,9 +4587,11 @@ static target_ulong disas_insn(DisasContext *s, CPUState *cpu)
|
||
|
|
switch (b) {
|
||
|
|
case 0xf3:
|
||
|
|
prefixes |= PREFIX_REPZ;
|
||
|
|
+ prefixes &= ~PREFIX_REPNZ;
|
||
|
|
goto next_byte;
|
||
|
|
case 0xf2:
|
||
|
|
prefixes |= PREFIX_REPNZ;
|
||
|
|
+ prefixes &= ~PREFIX_REPZ;
|
||
|
|
goto next_byte;
|
||
|
|
case 0xf0:
|
||
|
|
prefixes |= PREFIX_LOCK;
|
||
|
|
--
|
||
|
|
2.41.0.windows.1
|
||
|
|
|