[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [PULL 19/54] s390x/tcg: Implement VECTOR GALOIS FIELD M
From: |
David Hildenbrand |
Subject: |
Re: [qemu-s390x] [PULL 19/54] s390x/tcg: Implement VECTOR GALOIS FIELD MULTIPLY SUM (AND ACCUMULATE) |
Date: |
Fri, 31 May 2019 13:32:15 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 30.05.19 13:22, Peter Maydell wrote:
> On Mon, 20 May 2019 at 18:06, Cornelia Huck <address@hidden> wrote:
>>
>> From: David Hildenbrand <address@hidden>
>>
>> A galois field multiplication in field 2 is like binary multiplication,
>> however instead of doing ordinary binary additions, xor's are performed.
>> So no carries are considered.
>>
>> Implement all variants via helpers. s390_vec_sar() and s390_vec_shr()
>> will be reused later on.
>>
>> Reviewed-by: Richard Henderson <address@hidden>
>> Signed-off-by: David Hildenbrand <address@hidden>
>
> Hi -- Coverity (CID 1401703) complains that a lot of this
> function is dead code:
>
>> +static S390Vector galois_multiply64(uint64_t a, uint64_t b)
>> +{
>> + S390Vector res = {};
>> + S390Vector va = {
>> + .doubleword[1] = a,
>> + };
>> + S390Vector vb = {
>> + .doubleword[1] = b,
>> + };
>> +
>> + while (!s390_vec_is_zero(&vb)) {
>> + if (vb.doubleword[1] & 0x1) {
>> + s390_vec_xor(&res, &res, &va);
>> + }
>> + s390_vec_shl(&va, &va, 1);
>> + s390_vec_shr(&vb, &vb, 1);
>> + }
>> + return res;
>> +}
>
> but I can't make any sense of its annotations or why it
> thinks this is true. Would somebody like to have a look at the
> issue? If it's just Coverity getting confused we can mark it
> as a false positive.
I can't make absolutely any sense of the coverity gibberish as well.
The only think is that "vb->doubleword[0]" will always be 0, but that's
not what coverity is complaining about.
Marking it as false positive, thanks!
>
> thanks
> -- PMM
>
--
Thanks,
David / dhildenb
- [qemu-s390x] [PULL 12/54] s390x/tcg: Implement VECTOR AVERAGE LOGICAL, (continued)
- [qemu-s390x] [PULL 12/54] s390x/tcg: Implement VECTOR AVERAGE LOGICAL, Cornelia Huck, 2019/05/20
- [qemu-s390x] [PULL 13/54] s390x/tcg: Implement VECTOR CHECKSUM, Cornelia Huck, 2019/05/20
- [qemu-s390x] [PULL 14/54] s390x/tcg: Implement VECTOR ELEMENT COMPARE *, Cornelia Huck, 2019/05/20
- [qemu-s390x] [PULL 15/54] s390x/tcg: Implement VECTOR COMPARE *, Cornelia Huck, 2019/05/20
- [qemu-s390x] [PULL 16/54] s390x/tcg: Implement VECTOR COUNT LEADING ZEROS, Cornelia Huck, 2019/05/20
- [qemu-s390x] [PULL 17/54] s390x/tcg: Implement VECTOR COUNT TRAILING ZEROS, Cornelia Huck, 2019/05/20
- [qemu-s390x] [PULL 18/54] s390x/tcg: Implement VECTOR EXCLUSIVE OR, Cornelia Huck, 2019/05/20
- [qemu-s390x] [PULL 19/54] s390x/tcg: Implement VECTOR GALOIS FIELD MULTIPLY SUM (AND ACCUMULATE), Cornelia Huck, 2019/05/20
- [qemu-s390x] [PULL 20/54] s390x/tcg: Implement VECTOR LOAD COMPLEMENT, Cornelia Huck, 2019/05/20
- [qemu-s390x] [PULL 21/54] s390x/tcg: Implement VECTOR LOAD POSITIVE, Cornelia Huck, 2019/05/20
- [qemu-s390x] [PULL 22/54] s390x/tcg: Implement VECTOR (MAXIMUM|MINIMUM) (LOGICAL), Cornelia Huck, 2019/05/20
- [qemu-s390x] [PULL 23/54] s390x/tcg: Implement VECTOR MULTIPLY AND ADD *, Cornelia Huck, 2019/05/20
- [qemu-s390x] [PULL 24/54] s390x/tcg: Implement VECTOR MULTIPLY *, Cornelia Huck, 2019/05/20
- [qemu-s390x] [PULL 25/54] s390x/tcg: Implement VECTOR NAND, Cornelia Huck, 2019/05/20
- [qemu-s390x] [PULL 26/54] s390x/tcg: Implement VECTOR NOR, Cornelia Huck, 2019/05/20
- [qemu-s390x] [PULL 27/54] s390x/tcg: Implement VECTOR NOT EXCLUSIVE OR, Cornelia Huck, 2019/05/20
- [qemu-s390x] [PULL 28/54] s390x/tcg: Implement VECTOR OR, Cornelia Huck, 2019/05/20