[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/6] target-arm: fix Neon right shifts with shif
From: |
Christophe Lyon |
Subject: |
Re: [Qemu-devel] [PATCH 2/6] target-arm: fix Neon right shifts with shift amount == input width. |
Date: |
Tue, 15 Feb 2011 14:47:11 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7 |
>> - dest = src1 >> (tmp - 1); \
>> + dest = src1 >> (-tmp - 1); \
>> dest++; \
>> dest >>= 1; \
>
> Again, these three lines have the same effect as dest = 0,
> so we can fold into the previous if().
>
>> } else if (tmp < 0) { \
>> @@ -594,7 +594,7 @@ uint64_t HELPER(neon_rshl_s64)(uint64_t valop, uint64_t
>> shiftop)
>> val = 0;
>> } else if (shift < -64) {
>> val >>= 63;
>
> You didn't change this case, but it is the wrong answer:
> should be 0.
>
>> - } else if (shift == -63) {
>> + } else if (shift == -64) {
>> val >>= 63;
>> val++;
>> val >>= 1;
>
> Always results in 0.
>
Oops sorry, in these 3 cases, I just fixed obvious typos but didn't question
the actual code.
- Re: [Qemu-devel] [PATCH 6/6] target-arm: fix decoding of Neon 64 bit shifts., (continued)
- [Qemu-devel] [PATCH 4/6] target-arm: fix saturated values for Neon right shifts., christophe.lyon, 2011/02/11
- [Qemu-devel] [PATCH 1/6] target-arm: Fix rounding constant addition for Neon shift instructions., christophe.lyon, 2011/02/11
- [Qemu-devel] [PATCH 2/6] target-arm: fix Neon right shifts with shift amount == input width., christophe.lyon, 2011/02/11
- [Qemu-devel] [PATCH 5/6] target-arm: fix Neon VQSHRN and VSHRN., christophe.lyon, 2011/02/11
- [Qemu-devel] [PATCH 3/6] target-arm: fix unsigned 64 bit right shifts., christophe.lyon, 2011/02/11
- Re: [Qemu-devel] [PATCH v3 0/6] target-arm: Fix Neon shift instructions., Peter Maydell, 2011/02/14