On 13.04.19 02:15, Richard Henderson wrote:
> 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,
>
Thanks, missed these helpers!
> Reviewed-by: Richard Henderson <[email protected]>
>
> This does point out that I should go ahead and fill out the
> variable shift and rotate patterns in gvec...
>
>
> r~
>
--
Thanks,
David / dhildenb