From patchwork Mon Apr 15 18:40:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 236688 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 3513D2C00E6 for ; Tue, 16 Apr 2013 05:05:05 +1000 (EST) Received: from localhost ([::1]:57626 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URoQG-0001yw-Tu for incoming@patchwork.ozlabs.org; Mon, 15 Apr 2013 14:46:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URoMw-00067O-MT for qemu-devel@nongnu.org; Mon, 15 Apr 2013 14:43:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URoMt-0002WS-1y for qemu-devel@nongnu.org; Mon, 15 Apr 2013 14:43:10 -0400 Received: from mail-qe0-f43.google.com ([209.85.128.43]:40284) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URoMs-0002WO-Tz for qemu-devel@nongnu.org; Mon, 15 Apr 2013 14:43:06 -0400 Received: by mail-qe0-f43.google.com with SMTP id f6so2907904qej.30 for ; Mon, 15 Apr 2013 11:43:06 -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=81UANyH3IfohVnW/Hv7w/YNUxyMwe/nvNuEkXToEaS4=; b=N1oDt7+J/zy2jAkCIUhfQg2kFQ/GvISWnpfF6CKknknQvsFr7+JhD4GY90ptKaZ2em 1BN30OmlYREQYfWGzZOv6LHp4yT76JDZmsgSS56IERhPIAtxpOPZHMocCvMCr5mvVseI FTUlO6YlLH1gKeV5yKfIBlayGR5Q3JMHPg9QpkoaL+tkt+W9p7PlPpcIcHpx4DeT3Fdr FwHXWG+S9cV5a1S37xYfwLH6O9+1Z5YpWh1fOgaatc4XPkkfexrZLODP3lwSH/1wIC9s I+3SDpXtVJZRB+TzpaC7GsWZOfKmVDIDs+UpaFsEqKSymjoBsrKocq/WB8sOWFi+UhYW hGXA== X-Received: by 10.49.5.100 with SMTP id r4mr20845133qer.36.1366051386476; Mon, 15 Apr 2013 11:43:06 -0700 (PDT) Received: from pebble.com (214.Red-217-126-56.staticIP.rima-tde.net. [217.126.56.214]) by mx.google.com with ESMTPS id g6sm33990707qav.6.2013.04.15.11.43.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 15 Apr 2013 11:43:05 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 15 Apr 2013 20:40:47 +0200 Message-Id: <1366051272-12979-9-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1366051272-12979-1-git-send-email-rth@twiddle.net> References: <1366051272-12979-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.128.43 Cc: av1474@comtv.ru, aurelien@aurel32.net Subject: [Qemu-devel] [PATCH v5 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. Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- 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));