From patchwork Tue Mar 5 00:32: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: 224887 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 144B32C0347 for ; Tue, 5 Mar 2013 11:48:01 +1100 (EST) Received: from localhost ([::1]:35424 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCfqc-0007iT-5K for incoming@patchwork.ozlabs.org; Mon, 04 Mar 2013 19:35:14 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCfos-0005Ao-UM for qemu-devel@nongnu.org; Mon, 04 Mar 2013 19:33:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCfop-00045X-A2 for qemu-devel@nongnu.org; Mon, 04 Mar 2013 19:33:26 -0500 Received: from mail-ia0-x232.google.com ([2607:f8b0:4001:c02::232]:62957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCfop-00045N-6C for qemu-devel@nongnu.org; Mon, 04 Mar 2013 19:33:23 -0500 Received: by mail-ia0-f178.google.com with SMTP id y26so5405601iab.37 for ; Mon, 04 Mar 2013 16:33:22 -0800 (PST) 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=J1gLmcj+kcB0eTSAWjznuzytXthB1bBkFa+rinc6RJU=; b=vYq3oRLCN/M1Adv6AFg0w4Alp8f5H4DvaGsW3yfVR1QzO5EIdCGuqF3UPuxJPo5Hl4 HOngYw2P55h/tTaWYqhLHC5FNWss79Dc3kI0nnBBMF/44oXZApBkQe+8dhd8/OZrKCox iZd0d9NVCq4zeQqbj5Gw1sG4ZXO6+8aWYtOOvJZDP3VqqluQIPafWA8FfGjjnWPkl7ob i76dANxVFc7pzGlcL662QF6yRReIiEV8ytU53ATKTdZjnk8lzrtl3wKXD6AL9z1r+aYI KXZm2y2MNyiaLNj9Kan3z8A/sBFDBrKnSyezuHzkEGlXxi5q3KdUxrugF0Wo/jOrIJ4x V68A== X-Received: by 10.43.135.68 with SMTP id if4mr25200536icc.44.1362443602776; Mon, 04 Mar 2013 16:33:22 -0800 (PST) Received: from pebble.twiddle.net (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPS id ih1sm12171205igc.3.2013.03.04.16.33.20 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 04 Mar 2013 16:33:21 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 4 Mar 2013 16:32:47 -0800 Message-Id: <1362443590-28191-5-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1362443590-28191-1-git-send-email-rth@twiddle.net> References: <1362443590-28191-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:4001:c02::232 Cc: av1474@comtv.ru Subject: [Qemu-devel] [PATCH v2 04/27] tcg-ppc64: Introduce and use tcg_out_ext32u 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 Signed-off-by: Richard Henderson Reviewed-by: Aurelien Jarno --- tcg/ppc64/tcg-target.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index 3587d0e..84e30ad 100644 --- a/tcg/ppc64/tcg-target.c +++ b/tcg/ppc64/tcg-target.c @@ -451,6 +451,11 @@ static inline void tcg_out_rlw(TCGContext *s, int op, TCGReg ra, TCGReg rs, tcg_out32(s, op | RA(ra) | RS(rs) | SH(sh) | MB(mb) | ME(me)); } +static inline void tcg_out_ext32u(TCGContext *s, TCGReg dst, TCGReg src) +{ + tcg_out_rld(s, RLDICL, dst, src, 0, 32); +} + static void tcg_out_movi32(TCGContext *s, TCGReg ret, int32_t arg) { if (arg == (int16_t) arg) @@ -484,7 +489,7 @@ static void tcg_out_movi (TCGContext *s, TCGType type, else { tcg_out_movi32 (s, ret, arg32); if (arg32 < 0) - tcg_out_rld (s, RLDICL, ret, ret, 0, 32); + tcg_out_ext32u(s, ret, ret); } } } @@ -578,7 +583,7 @@ static void tcg_out_tlb_read(TCGContext *s, TCGReg r0, TCGReg r1, TCGReg r2, TCGReg addr_reg, int s_bits, int offset) { #if TARGET_LONG_BITS == 32 - tcg_out_rld (s, RLDICL, addr_reg, addr_reg, 0, 32); + tcg_out_ext32u(s, addr_reg, addr_reg); tcg_out_rlw(s, RLWINM, r0, addr_reg, 32 - (TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS), @@ -691,7 +696,7 @@ static void tcg_out_qemu_ld (TCGContext *s, const TCGArg *args, int opc) #else /* !CONFIG_SOFTMMU */ #if TARGET_LONG_BITS == 32 - tcg_out_rld (s, RLDICL, addr_reg, addr_reg, 0, 32); + tcg_out_ext32u(s, addr_reg, addr_reg); #endif r0 = addr_reg; r1 = 3; @@ -824,7 +829,7 @@ static void tcg_out_qemu_st (TCGContext *s, const TCGArg *args, int opc) #else /* !CONFIG_SOFTMMU */ #if TARGET_LONG_BITS == 32 - tcg_out_rld (s, RLDICL, addr_reg, addr_reg, 0, 32); + tcg_out_ext32u(s, addr_reg, addr_reg); #endif r1 = 3; r0 = addr_reg; @@ -1531,7 +1536,7 @@ static void tcg_out_op (TCGContext *s, TCGOpcode opc, const TCGArg *args, break; case INDEX_op_ext32u_i64: - tcg_out_rld (s, RLDICL, args[0], args[1], 0, 32); + tcg_out_ext32u(s, args[0], args[1]); break; case INDEX_op_setcond_i32: