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~