From mboxrd@z Thu Jan 1 00:00:00 1970 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) Sender: Richard Henderson From: Richard Henderson Date: Thu, 4 Apr 2013 17:56:18 -0500 Message-Id: <1365116186-19382-26-git-send-email-rth@twiddle.net> In-Reply-To: <1365116186-19382-1-git-send-email-rth@twiddle.net> References: <1365116186-19382-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH v4 25/33] tcg-ppc64: Cleanup i32 constants to tcg_out_cmp List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: av1474@comtv.ru, Aurelien Jarno Nothing else in the call chain ensures that these constants don't have garbage in the high bits. Signed-off-by: Richard Henderson --- 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: -- 1.8.1.4