Re: [PATCH for-2.0 2/2] target-arm: A64: Add saturating accumulate ops (USQADD/SUQADD)

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

 



On 18 March 2014 21:10, Richard Henderson <rth@xxxxxxxxxxx> wrote:
> On 03/18/2014 12:23 PM, Peter Maydell wrote:
>> +#define USATACC(bits, shift) \
>> +    do { \
>> +        va = (int##bits##_t)((a >> shift) & ((1 << bits) - 1));         \
>> +        vb = (uint##bits##_t)((b >> shift) & ((1 << bits) - 1));        \
>
> The masking seems redundant with the cast.
> Perhaps better to use extract32/sextract32?
>
>> +        r |= (uint32_t) (vr & ((1 << bits) - 1)) << shift;              \
>
> Perhaps better with deposit32?  That implies an unnecessary mask of R, but
> perhaps the compiler can clean that up...

Yeah, it looks much nicer with extract32/deposit32, so I'll just
switch it (and SSATACC) to use those.

thanks
-- PMM
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm




[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux