On Mon, 14 Jun 2021 at 09:43, Richard Henderson <richard.hender...@linaro.org> wrote: > > We will shortly require sari in other context; > split out both for cleanliness sake. > > Signed-off-by: Richard Henderson <richard.hender...@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.mayd...@linaro.org> thanks -- PMM