From: Richard Henderson Date: Tue, 14 Aug 2018 16:17:22 +0000 (+0100) Subject: target/arm: Fix typo in do_sat_addsub_64 X-Git-Tag: v3.0.1~104 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f7ddde210a0944b91be1c51bd090104191a76414;p=thirdparty%2Fqemu.git target/arm: Fix typo in do_sat_addsub_64 Used the wrong temporary in the computation of subtractive overflow. Reported-by: Laurent Desnogues Signed-off-by: Richard Henderson Reviewed-by: Laurent Desnogues Tested-by: Alex Bennée Tested-by: Laurent Desnogues Message-id: 20180801123111.3595-3-richard.henderson@linaro.org Signed-off-by: Peter Maydell (cherry picked from commit 7a31e0c6c68baffab0867bdd92b8744568b1d3ba) Signed-off-by: Michael Roth --- diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 374051cd20a..9dd4c38bab7 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -1625,7 +1625,7 @@ static void do_sat_addsub_64(TCGv_i64 reg, TCGv_i64 val, bool u, bool d) /* Detect signed overflow for subtraction. */ tcg_gen_xor_i64(t0, reg, val); tcg_gen_sub_i64(t1, reg, val); - tcg_gen_xor_i64(reg, reg, t0); + tcg_gen_xor_i64(reg, reg, t1); tcg_gen_and_i64(t0, t0, reg); /* Bound the result. */