From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMRXV-0002J3-Lz for qemu-devel@nongnu.org; Sun, 31 Mar 2013 19:19:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UMRXT-00029P-3K for qemu-devel@nongnu.org; Sun, 31 Mar 2013 19:19:53 -0400 Received: from mail-pb0-f53.google.com ([209.85.160.53]:55318) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMRXS-00029J-T6 for qemu-devel@nongnu.org; Sun, 31 Mar 2013 19:19:51 -0400 Received: by mail-pb0-f53.google.com with SMTP id un1so904729pbc.40 for ; Sun, 31 Mar 2013 16:19:50 -0700 (PDT) Sender: Richard Henderson Message-ID: <5158C491.4010509@twiddle.net> Date: Sun, 31 Mar 2013 16:19:45 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1364687686-6006-1-git-send-email-aurelien@aurel32.net> In-Reply-To: <1364687686-6006-1-git-send-email-aurelien@aurel32.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] target-ppc: fix nego and subf*o instructions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: qemu-devel@nongnu.org, Alexander Graf On 2013-03-30 16:54, Aurelien Jarno wrote: > 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); > } I'm a bit confused. This is the exact same algorithm that's used on ARM and i386. And as far as I can determine, all three platforms have the same definition of "overflow". r~