On 30.05.19 13:22, Peter Maydell wrote:
> On Mon, 20 May 2019 at 18:06, Cornelia Huck <coh...@redhat.com> wrote:
>>
>> From: David Hildenbrand <da...@redhat.com>
>>
>> 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 <richard.hender...@linaro.org>
>> Signed-off-by: David Hildenbrand <da...@redhat.com>
> 
> 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

Reply via email to