qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 13/13] target/i386: avoid using s->tmp0 for add to implicit r


From: Richard Henderson
Subject: Re: [PATCH 13/13] target/i386: avoid using s->tmp0 for add to implicit registers
Date: Sun, 15 Dec 2024 09:47:15 -0600
User-agent: Mozilla Thunderbird

On 12/15/24 03:06, Paolo Bonzini wrote:
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>
---
  target/i386/tcg/translate.c | 23 +++++++++++++++--------
  1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index 4b652cc23e1..8de506927b0 100644
--- a/target/i386/tcg/translate.c
+++ b/target/i386/tcg/translate.c
@@ -504,17 +504,24 @@ static inline void gen_op_jmp_v(DisasContext *s, TCGv 
dest)
      s->pc_save = -1;
  }
+static inline void gen_op_add_reg(DisasContext *s, MemOp size, int reg, TCGv val)

Drop the inline.  Otherwise, yay!

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]