Received: from eggs.gnu.org ([208.118.235.92]:43162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URoOx-00016l-4z for qemu-devel@nongnu.org; Mon, 15 Apr 2013 14:45:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URoOu-0003Ud-AG for qemu-devel@nongnu.org; Mon, 15 Apr 2013 14:45:15 -0400 Received: from mail-qe0-f51.google.com ([209.85.128.51]:37530) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URoOu-0003UZ-5K for qemu-devel@nongnu.org; Mon, 15 Apr 2013 14:45:12 -0400 Received: by mail-qe0-f51.google.com with SMTP id 1so2872021qec.24 for ; Mon, 15 Apr 2013 11:45:11 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Mon, 15 Apr 2013 20:41:05 +0200 Message-Id: <1366051272-12979-27-git-send-email-rth@twiddle.net> In-Reply-To: <1366051272-12979-1-git-send-email-rth@twiddle.net> References: <1366051272-12979-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH v5 26/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@aurel32.net Nothing else in the call chain ensures that these constants don't have garbage in the high bits. Reviewed-by: Aurelien Jarno 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 84c7575..70cbb86 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