On 1/7/26 16:57, BALATON Zoltan wrote:
On Wed, 7 Jan 2026, Paolo Bonzini wrote:
VEX is only forbidden in real and vm86 mode; 16-bit protected mode supports
it for some unfathomable reason.

Cc: [email protected]
Signed-off-by: Paolo Bonzini <[email protected]>
---
target/i386/tcg/decode-new.c.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/i386/tcg/decode-new.c.inc b/target/i386/tcg/ decode-new.c.inc
index f662364c600..243df7e3735 100644
--- a/target/i386/tcg/decode-new.c.inc
+++ b/target/i386/tcg/decode-new.c.inc
@@ -2875,7 +2875,7 @@ static void disas_insn(DisasContext *s, CPUState *cpu)
         * VEX prefixes cannot be used except in 32-bit mode.

Does this comment need updating too?

Good catch, it should be "Bits 6-7 of the first byte must be set except in 64-bit mode".

Paolo


Regards,
BALATON Zoltan

         * Otherwise the instruction is LES or LDS.
         */
-        if (CODE32(s) && !VM86(s)) {
+        if (PE(s) && !VM86(s)) {
            static const int pp_prefix[4] = {
                0, PREFIX_DATA, PREFIX_REPZ, PREFIX_REPNZ
            };





Reply via email to