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: Peter Maydell
Subject: Re: [PATCH 06/28] tcg/ppc: Split out tcg_out_sari{32,64}
Date: Mon, 21 Jun 2021 15:22:17 +0100

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>

thanks
-- PMM



reply via email to

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