From patchwork Thu Apr 4 22:56:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 233980 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 683032C00A6 for ; Fri, 5 Apr 2013 10:08:02 +1100 (EST) Received: from localhost ([::1]:53415 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNtGC-0004Du-Fj for incoming@patchwork.ozlabs.org; Thu, 04 Apr 2013 19:08:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNt69-0006NX-0G for qemu-devel@nongnu.org; Thu, 04 Apr 2013 18:57:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNt62-0001Pk-Ap for qemu-devel@nongnu.org; Thu, 04 Apr 2013 18:57:36 -0400 Received: from mail-ob0-x234.google.com ([2607:f8b0:4003:c01::234]:41199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNt62-0001PZ-4E for qemu-devel@nongnu.org; Thu, 04 Apr 2013 18:57:30 -0400 Received: by mail-ob0-f180.google.com with SMTP id wo10so3176296obc.11 for ; Thu, 04 Apr 2013 15:57:29 -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=XQwi23MQGTdW2J5NJs+W4Mnvyq3KISCKt3KD0C4EC+g=; b=PjFuKmYvI8k0xd8Ism6EmIemfrm8M248Av9bNkNWlhP3lJSlB7yk5jKc4vhj9Hr131 uBcazpiWqSIYYw8LeQj9jjpvJqAhLoGoGHrsD+2FZ9NbwymPAbA9wfrDZwZ1BLkqAXB6 MlCGFnOSuuxL5cH4z7eaVCe3z/A6uDV/kTc948Z3F4V5PC+14/MfV3ll+K9RaRt831Ed 18Wzhs5IJMbsXi+TrGFL5QCH1Ci2Int04ot3WhGjirdohrUwb0MQtQt1cMlKwpj6GOT9 h3T9DL7eDbY78xH8K4tzxS2GZyhgrDoa2MTFm053AZbSgswdpsLaX3d77oS03xN5xtd2 WDag== X-Received: by 10.182.102.106 with SMTP id fn10mr1406692obb.85.1365116249586; Thu, 04 Apr 2013 15:57:29 -0700 (PDT) Received: from pebble.com ([12.236.175.36]) by mx.google.com with ESMTPS id j10sm9227424obg.4.2013.04.04.15.57.28 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 04 Apr 2013 15:57:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 4 Apr 2013 17:56:18 -0500 Message-Id: <1365116186-19382-26-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: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::234 Cc: av1474@comtv.ru, Aurelien Jarno Subject: [Qemu-devel] [PATCH v4 25/33] tcg-ppc64: Cleanup i32 constants to tcg_out_cmp 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 Nothing else in the call chain ensures that these constants don't have garbage in the high bits. Signed-off-by: Richard Henderson Reviewed-by: Aurelien Jarno --- tcg/ppc64/tcg-target.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index edb2b6c..27d5ea5 100644 --- a/tcg/ppc64/tcg-target.c +++ b/tcg/ppc64/tcg-target.c @@ -1059,6 +1059,11 @@ static void tcg_out_cmp (TCGContext *s, int cond, TCGArg arg1, TCGArg arg2, int imm; uint32_t op; + /* Simplify the comparisons below wrt CMPI. */ + if (type == TCG_TYPE_I32) { + arg2 = (int32_t)arg2; + } + switch (cond) { case TCG_COND_EQ: case TCG_COND_NE: