On Tue, 11 May 2021 at 16:40, Richard Henderson
<richard.hender...@linaro.org> wrote:
>
> On 5/11/21 3:43 AM, Peter Maydell wrote:
> >> +#define do_sqshl_d(n, m) \
> >> +   ({ uint32_t discard; do_sqrshl_d(n, m, false, &discard); })
> > Why pass in &discard rather than just NULL ? (Similarly below.)
>
> sat != NULL means enable saturation.
>
> Discard the results because unlike NEON, there is no architectural SVE flag to
> indicate that saturation has occurred.

Aha. Might be useful to expand the comment a little:

/*
 * Unlike the NEON and AdvSIMD versions, there is no QC bit to set.
 * We pass in a pointer to a dummy saturation field to trigger
 * the saturating arithmetic but discard the information about
 * whether it has occurred.
 */

-- PMM

Reply via email to