On 4/11/19 12:08 AM, David Hildenbrand wrote: > +#define DEF_ROTL(BITS) > \ > +static uint##BITS##_t rotl##BITS(uint##BITS##_t a, uint8_t count) > \ > +{ > \ > + count &= BITS - 1; > \ > + return (a << count) | (a >> (BITS - count)); > \ > +} > +DEF_ROTL(8) > +DEF_ROTL(16)
We already have rol8 and rol16 in <qemu/bitops.h> for this. Otherwise, Reviewed-by: Richard Henderson <richard.hender...@linaro.org> This does point out that I should go ahead and fill out the variable shift and rotate patterns in gvec... r~