diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2022-08-24 17:44:45 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-09-19 15:16:00 +0200 |
commit | 5c2f60bd1b6fc7164118a6270eefbf0b6dafc4ae (patch) | |
tree | cddb68b56cc827c106f5be7035e97bb1b29d035b /target | |
parent | ca4b1b43bc5ac25c56a3a7a4a2252d6fdc8dcf02 (diff) |
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>
Diffstat (limited to 'target')
-rw-r--r-- | target/i386/tcg/translate.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 5f31a59fb8..eaa56b0f48 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -4733,9 +4733,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; |