[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [Qemu-devel] [PATCH v1 09/41] s390x/tcg: Implement VECT
From: |
David Hildenbrand |
Subject: |
Re: [qemu-s390x] [Qemu-devel] [PATCH v1 09/41] s390x/tcg: Implement VECTOR CHECKSUM |
Date: |
Tue, 16 Apr 2019 11:13:07 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 16.04.19 11:08, Richard Henderson wrote:
> On 4/15/19 10:58 PM, David Hildenbrand wrote:
>>> You could use
>>>
>>> tcg_gen_add2_i32(sum, tmp, sum, zero, tmp, zero);
>>> tcg_gen_add_i32(sum, sum, tmp);
>> That makes perfect sense, I will use that for now, thanks!
>>
>
> Here's a funny one. We can do this in one operation:
>
> tcg_gen_add2_i32(tmp, sum, sum, sum, tmp, tmp);
:D I had to look at it 10 times. Very nice trick.
>
> The lower (sum+tmp) carries into the upper (sum+tmp).
> We take the upper result and discard the lower.
>
>
> r~
>
--
Thanks,
David / dhildenb
- Re: [qemu-s390x] [Qemu-devel] [PATCH v1 11/41] s390x/tcg: Implement VECTOR COMPARE *, (continued)
[qemu-s390x] [PATCH v1 07/41] s390x/tcg: Implement VECTOR AVERAGE, David Hildenbrand, 2019/04/11
[qemu-s390x] [PATCH v1 04/41] s390x/tcg: Implement VECTOR ADD WITH CARRY, David Hildenbrand, 2019/04/11
[qemu-s390x] [PATCH v1 03/41] s390x/tcg: Implement VECTOR ADD COMPUTE CARRY, David Hildenbrand, 2019/04/11