diff options
author | LIU Zhiwei <zhiwei_liu@c-sky.com> | 2021-02-12 23:02:21 +0800 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2021-05-11 20:02:06 +1000 |
commit | 65606f21243a796537bfe4708720a9bf4bb50169 (patch) | |
tree | 4eddd62d2c56a4f6f0e128fa40ec14871e2ebe95 /hw/xtensa | |
parent | 11c27c6ded4d41bf0d100c8b5b49d5056204c911 (diff) |
target/riscv: Fixup saturate subtract function
The overflow predication ((a - b) ^ a) & (a ^ b) & INT64_MIN is right.
However, when the predication is ture and a is 0, it should return maximum.
Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20210212150256.885-4-zhiwei_liu@c-sky.com
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'hw/xtensa')
0 files changed, 0 insertions, 0 deletions