qemu-s390x
[Top][All Lists]
Advanced

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

Re: [qemu-s390x] [Qemu-devel] [PATCH v2 3/5] s390x/tcg: Implement VECTOR


From: Richard Henderson
Subject: Re: [qemu-s390x] [Qemu-devel] [PATCH v2 3/5] s390x/tcg: Implement VECTOR FIND ELEMENT NOT EQUAL
Date: Tue, 28 May 2019 07:55:35 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 5/24/19 4:33 AM, David Hildenbrand wrote:
> +    /* identify the smaller element */
> +    if (first_inequal < 16) {
> +        uint8_t enr = first_inequal / (1 << es);
> +        uint32_t a = s390_vec_read_element(v2, enr, es);
> +        uint32_t b = s390_vec_read_element(v3, enr, es);
> +
> +        smaller = a < b;
> +    }
> +
> +    if (zs) {
> +        z0 = zero_search(a0, mask);
> +        z1 = zero_search(a1, mask);
> +        first_zero = match_index(z0, z1);
> +    }
> +
> +    s390_vec_write_element64(v1, 0, MIN(first_inequal, first_zero));
> +    s390_vec_write_element64(v1, 1, 0);
> +    if (first_zero == 16 && first_inequal == 16) {
> +        return 3;
> +    } else if (first_zero < first_inequal) {
> +        return 0;
> +    }
> +    return smaller ? 1 : 2;

Perhaps move the computation of smaller down here where it is used.

Otherwise,
Reviewed-by: Richard Henderson <address@hidden>


r~



reply via email to

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