qemu-stable
[Top][All Lists]
Advanced

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

Re: [PATCH] target/arm: Fix sve pred_desc decoding


From: Richard Henderson
Subject: Re: [PATCH] target/arm: Fix sve pred_desc decoding
Date: Thu, 7 Jan 2021 09:13:53 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 1/7/21 8:02 AM, Peter Maydell wrote:
>>  void HELPER(sve_zip_p)(void *vd, void *vn, void *vm, uint32_t pred_desc)
>>  {
>> -    intptr_t oprsz = extract32(pred_desc, 0, SIMD_OPRSZ_BITS) + 2;
>> +    intptr_t oprsz = extract32(pred_desc, 0, SIMD_DATA_SHIFT) + 2;
> 
> Why do we not get oprsz by extracting SIMD_OPRSZ_BITS starting at
> SIMD_OPRSZ_SHIFT ? (or even by calling simd_oprsz(), which
> certainly looks like it ought to be a helper function for
> extracting the oprsz...)

The predicate operations are small -- minimum 2 bytes -- and cannot encode with
the real simd_oprsz (minumum 8, then multiples of 16).

This is shear abuse of the SIMD_* defines.  You're right that I shouldn't have
done this in the first place, and should probably rename everything having to
do with predicates.


r~



reply via email to

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