[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/4] target/arm: Implement SVE2 RADDHNB, RADDHNT
From: |
Richard Henderson |
Subject: |
Re: [PATCH 2/4] target/arm: Implement SVE2 RADDHNB, RADDHNT |
Date: |
Fri, 17 Apr 2020 16:58:33 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
On 4/17/20 2:24 PM, Richard Henderson wrote:
> On 4/17/20 9:22 AM, Stephen Long wrote:
>> +#define DO_RADDHN(N, M, SH) ((N + M + (1 << (SH - 1))) >> SH)
>
> This formula will overflow. See DO_RSHR -- with some added parenthesis, we
> could actually reuse that macro.
My bad. While it does overflow, all of these operations are truncating not
saturating, and moreover truncate to halfesize bits. Therefore overflow
doesn't matter.
r~
- [PATCH 0/4] target/arm: Implement last SVE2 narrowing section, Stephen Long, 2020/04/17
- [PATCH 1/4] target/arm: Implement SVE2 ADDHNB, ADDHNT, Stephen Long, 2020/04/17
- [PATCH 2/4] target/arm: Implement SVE2 RADDHNB, RADDHNT, Stephen Long, 2020/04/17
- [PATCH 3/4] target/arm: Implement SVE2 SUBHNB, SUBHNT, Stephen Long, 2020/04/17
- [PATCH 4/4] target/arm: Implement SVE2 RSUBHNB, RSUBHNT, Stephen Long, 2020/04/17
- Re: [PATCH 0/4] target/arm: Implement last SVE2 narrowing section, Richard Henderson, 2020/04/19