On Fri, 16 Jul 2021 at 17:34, Richard Henderson
wrote:
>
> On 7/13/21 6:36 AM, Peter Maydell wrote:
> > -return (1ULL << 47) - (src >= 0);
> > +return sextract64((1ULL << 47) - (src >= 0), 0, 48);
>
> Clearer as
>
>return src >= 0 ? MAKE_64BIT_MASK(0, 47) : MAKE_64BIT_MASK(47, 17);
Ye
On 7/13/21 6:36 AM, Peter Maydell wrote:
-return (1ULL << 47) - (src >= 0);
+return sextract64((1ULL << 47) - (src >= 0), 0, 48);
Clearer as
return src >= 0 ? MAKE_64BIT_MASK(0, 47) : MAKE_64BIT_MASK(47, 17);
? Otherwise,
Reviewed-by: Richard Henderson
r~
In do_sqrshl48_d() and do_uqrshl48_d() we got some of the edge
cases wrong and failed to saturate correctly:
(1) In do_sqrshl48_d() we used the same code that do_shrshl_bhs()
does to obtain the saturated most-negative and most-positive 48-bit
signed values for the large-shift-left case. This give