[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: |
David Hildenbrand |
Subject: |
Re: [qemu-s390x] [Qemu-devel] [PATCH v2 3/5] s390x/tcg: Implement VECTOR FIND ELEMENT NOT EQUAL |
Date: |
Tue, 28 May 2019 15:13:15 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 28.05.19 15:03, Richard Henderson wrote:
> On 5/28/19 8:02 AM, David Hildenbrand wrote:
>> On 28.05.19 14:55, Richard Henderson wrote:
>>> 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.
>>
>> Wanted to do that but then I realized that I would have to move
>> s390_vec_write_element64() as well, because v1 and v2/v3 could overlap.
>
> Oh, yes of course. R-B without any changes. ;-)
>
Thanks Richard, will send a pull request to Conny for this part soon.
I'll start getting the vector floating-point instruction into shape this
week. So don't start to relax ;)
Cheers!
>
> r~
>
--
Thanks,
David / dhildenb
- [qemu-s390x] [PATCH v2 1/5] s390x/tcg: Implement VECTOR FIND ANY ELEMENT EQUAL, (continued)
[qemu-s390x] [PATCH v2 5/5] s390x/tcg: Implement VECTOR STRING RANGE COMPARE, David Hildenbrand, 2019/05/24