tcg: Expand usadd/ussub with umin/umax
commit2552d60ebd6c519027d74bd452db7580b90e5cbd
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 15 Sep 2020 02:25:58 +0000 (14 19:25 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 5 Oct 2021 23:53:17 +0000 (5 16:53 -0700)
treec54c359e398a1f3dc4cc4fb85dc72560cbc82864
parentdc29f4746fc8c641fb1182495c2662381cc16e23
tcg: Expand usadd/ussub with umin/umax

For usadd, we only have to consider overflow.  Since ~B + B == -1,
the maximum value for A that saturates is ~B.

For ussub, we only have to consider underflow.  The minimum value
that saturates to 0 from A - B is B.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
tcg/tcg-op-vec.c