]> git.proxmox.com Git - mirror_qemu.git/commit
target/i386: add X86_SPECIALs for MOVSX and MOVZX
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 19 Oct 2023 13:40:54 +0000 (15:40 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 29 Dec 2023 21:03:15 +0000 (22:03 +0100)
commit8a36bbcf6c1769b1b5edb24cc4ceb2eb368446d5
tree9181279d0f40680f0585f5512f88e33b3d7b0893
parent5baf5641cc82fe18e98c1063d8682be9cdcae85c
target/i386: add X86_SPECIALs for MOVSX and MOVZX

Usually the registers are just moved into s->T0 without much care for
their operand size.  However, in some cases we can get more efficient
code if the operand fetching logic syncs with the emission function
on what is nicer.

All the current uses are mostly demonstrative and only reduce the code
in the emission functions, because the instructions do not support
memory operands.  However the logic is generic and applies to several
more instructions such as MOVSXD (aka movslq), one-byte shift
instructions, multiplications, XLAT, and indirect calls/jumps.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/tcg/decode-new.c.inc
target/i386/tcg/decode-new.h
target/i386/tcg/emit.c.inc