From patchwork Thu Apr 4 22:56:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 233997 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D8AF62C008F for ; Fri, 5 Apr 2013 10:22:50 +1100 (EST) Received: from localhost ([::1]:59354 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNt7p-0000Gy-3I for incoming@patchwork.ozlabs.org; Thu, 04 Apr 2013 18:59:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNt5h-0005aq-F6 for qemu-devel@nongnu.org; Thu, 04 Apr 2013 18:57:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNt5a-0001He-0z for qemu-devel@nongnu.org; Thu, 04 Apr 2013 18:57:09 -0400 Received: from mail-oa0-f46.google.com ([209.85.219.46]:60191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNt5Z-0001HS-RS for qemu-devel@nongnu.org; Thu, 04 Apr 2013 18:57:01 -0400 Received: by mail-oa0-f46.google.com with SMTP id k1so3412739oag.5 for ; Thu, 04 Apr 2013 15:57:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=VLwnSqtaXKqnlwIl9e3nDnJtZKPky6yyYpTyjtqjIY4=; b=iGoaFYy18UUpfOb33yOxvMeqvzu+H9mFsMqX5gOV53x9C6gCb+L9NWIJXRB0iN5vva Y5lbLupYerCmeGyjyuIOTDzw5vuzD5adeFlOjl25mjPL0YQRGTC1kUHQ3MIE6xNYMQdU RkgmF8dJEoj8gPepvWU2lOOnSkDbxrizzDCsgGV7sH40SNGLfCVewav2p1K7+n7gOSs0 taXxQEOyjwUhOpJX66Hy9Fm3nlx8xAtDtvhB1PVNyAlQB++k7b4NP3URxE8IpoXolR0v ZNoVmIzQBB2bPo/EOBvcD6BIwtJtUo6b7EUfe1eVxtndF5cv1pkIeXwRjiKE7JjIaNhs BFzQ== X-Received: by 10.60.33.73 with SMTP id p9mr993543oei.14.1365116221250; Thu, 04 Apr 2013 15:57:01 -0700 (PDT) Received: from pebble.com ([12.236.175.36]) by mx.google.com with ESMTPS id j10sm9227424obg.4.2013.04.04.15.56.59 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 04 Apr 2013 15:57:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 4 Apr 2013 17:56:01 -0500 Message-Id: <1365116186-19382-9-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1365116186-19382-1-git-send-email-rth@twiddle.net> References: <1365116186-19382-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.219.46 Cc: av1474@comtv.ru, Aurelien Jarno Subject: [Qemu-devel] [PATCH v4 08/33] tcg-ppc64: Fix setcond_i32 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org We weren't ignoring the high 32 bits during a NE comparison. Signed-off-by: Richard Henderson Reviewed-by: Aurelien Jarno --- tcg/ppc64/tcg-target.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index b12cbec..822eb07 100644 --- a/tcg/ppc64/tcg-target.c +++ b/tcg/ppc64/tcg-target.c @@ -1129,6 +1129,12 @@ static void tcg_out_setcond (TCGContext *s, TCGType type, TCGCond cond, tcg_out32 (s, XOR | SAB (arg1, 0, arg2)); } + /* Make sure and discard the high 32-bits of the input. */ + if (type == TCG_TYPE_I32) { + tcg_out32(s, EXTSW | RA(TCG_REG_R0) | RS(arg)); + arg = TCG_REG_R0; + } + if (arg == arg1 && arg1 == arg0) { tcg_out32(s, ADDIC | TAI(0, arg, -1)); tcg_out32(s, SUBFE | TAB(arg0, 0, arg));