qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 06/28] tcg/ppc: Split out tcg_out_sari{32,64}


From: Richard Henderson
Subject: Re: [PATCH 06/28] tcg/ppc: Split out tcg_out_sari{32,64}
Date: Mon, 21 Jun 2021 07:23:27 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 6/21/21 7:22 AM, Peter Maydell wrote:
On Mon, 14 Jun 2021 at 09:43, Richard Henderson
<richard.henderson@linaro.org> wrote:

We will shortly require sari in other context;
split out both for cleanliness sake.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
  tcg/ppc/tcg-target.c.inc | 15 ++++++++++++---
  1 file changed, 12 insertions(+), 3 deletions(-)

              /* Limit immediate shift count lest we create an illegal insn.  */
-            tcg_out32(s, SRAWI | RS(args[1]) | RA(args[0]) | SH(args[2] & 31));
+            tcg_out_sari32(s, args[0], args[1], args[2] & 31);

Maybe the "& 31" would be better inside tcg_out_sari32()
rather than outside it? The sari64() implementation already
implicitly ignores high bits of an overlarge shift count, so
having sari32() do the same would be more consistent.

Either way
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

Good idea.

r~



reply via email to

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