target/i386: fix memory opsize for Mov to/from Seg
authorXinyu Li <lixinyu@loongson.cn>
Sun, 2 Jun 2024 10:05:28 +0000 (18:05 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 5 Jun 2024 09:01:05 +0000 (11:01 +0200)
commit0683fff1cf7d495e50955a946bf59f8b9c20c3f1
treeee4c3306c5f73546a6748928c4d73b75f695ece4
parentda7c95920d027dbb00c6879c1da0216b19509191
target/i386: fix memory opsize for Mov to/from Seg

This commit fixes an issue with MOV instructions (0x8C and 0x8E)
involving segment registers; MOV to segment register's source is
16-bit, while MOV from segment register has to explicitly set the
memory operand size to 16 bits.  Introduce a new flag
X86_SPECIAL_Op0_Mw to handle this specification correctly.

Signed-off-by: Xinyu Li <lixinyu20s@ict.ac.cn>
Message-ID: <20240602100528.2135717-1-lixinyu20s@ict.ac.cn>
Fixes: 5e9e21bcc4d ("target/i386: move 60-BF opcodes to new decoder", 2024-05-07)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/tcg/decode-new.c.inc
target/i386/tcg/decode-new.h