target/i386: avoid using s->tmp0 for add to implicit registers
authorPaolo Bonzini <pbonzini@redhat.com>
Sun, 15 Dec 2024 09:06:12 +0000 (10:06 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 23 Jan 2025 10:50:53 +0000 (11:50 +0100)
commit22063f03a7626c77d7a4546b90fd27badd504269
tree4be1e2450e8e27b462eb0c3b4f7bd4a2751cc98a
parent82290c76476021c647824f816d8ccfbbfb773b2e
target/i386: avoid using s->tmp0 for add to implicit registers

For updates to implicit registers (RCX in LOOP instructions, RSI or RDI
in string instructions, or the stack pointer) do the add directly using
the registers (with no temporary) if 32-bit or 64-bit, or use a temporary
created for the occasion if 16-bit.  This is more efficient and removes
move instructions for the MO_TL case.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Link: https://lore.kernel.org/r/20241215090613.89588-14-pbonzini@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/tcg/translate.c