From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UM5bz-0002uG-MK for qemu-devel@nongnu.org; Sat, 30 Mar 2013 19:55:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UM5by-00029o-9m for qemu-devel@nongnu.org; Sat, 30 Mar 2013 19:55:03 -0400 Received: from hall.aurel32.net ([2001:470:1f15:c4f::1]:44584) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UM5by-00024n-2w for qemu-devel@nongnu.org; Sat, 30 Mar 2013 19:55:02 -0400 From: Aurelien Jarno Date: Sun, 31 Mar 2013 00:54:46 +0100 Message-Id: <1364687686-6006-1-git-send-email-aurelien@aurel32.net> Subject: [Qemu-devel] [PATCH] target-ppc: fix nego and subf*o instructions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexander Graf , Aurelien Jarno , Richard Henderson The overflow computation of nego and subf*o instructions has been broken in commit ffe30937. This patch fixes it. With this change the PPC emulation passes the Gwenole Beauchesne testsuite again. Cc: Alexander Graf Cc: Richard Henderson Signed-off-by: Aurelien Jarno --- target-ppc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 5e741d1..062493a 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -749,7 +749,7 @@ static inline void gen_op_arith_compute_ov(DisasContext *ctx, TCGv arg0, tcg_gen_xor_tl(cpu_ov, arg0, arg1); tcg_gen_xor_tl(t0, arg1, arg2); if (sub) { - tcg_gen_and_tl(cpu_ov, cpu_ov, t0); + tcg_gen_andc_tl(cpu_ov, t0, cpu_ov); } else { tcg_gen_andc_tl(cpu_ov, cpu_ov, t0); } -- 1.7.10.4