From eccda3afcc14b64b88dc64ad612206fa1224b340 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 16 Aug 2018 07:05:59 -0400 Subject: [PATCH] target/arm: Fix typo in do_sat_addsub_64 Used the wrong temporary in the computation of subtractive overflow. Backports commit 7a31e0c6c68baffab0867bdd92b8744568b1d3ba from qemu --- qemu/target/arm/translate-sve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/target/arm/translate-sve.c b/qemu/target/arm/translate-sve.c index 13c5f7ac..000accd8 100644 --- a/qemu/target/arm/translate-sve.c +++ b/qemu/target/arm/translate-sve.c @@ -1725,7 +1725,7 @@ static void do_sat_addsub_64(DisasContext *s, TCGv_i64 reg, TCGv_i64 val, bool u /* Detect signed overflow for subtraction. */ tcg_gen_xor_i64(tcg_ctx, t0, reg, val); tcg_gen_sub_i64(tcg_ctx, t1, reg, val); - tcg_gen_xor_i64(tcg_ctx, reg, reg, t0); + tcg_gen_xor_i64(tcg_ctx, reg, reg, t1); tcg_gen_and_i64(tcg_ctx, t0, t0, reg); /* Bound the result. */