From patchwork Mon Apr 15 18:40:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 236694 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 683152C00A8 for ; Tue, 16 Apr 2013 05:12:59 +1000 (EST) Received: from localhost ([::1]:54322 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URoOW-00087q-DW for incoming@patchwork.ozlabs.org; Mon, 15 Apr 2013 14:44:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URoMi-0005fu-Ud for qemu-devel@nongnu.org; Mon, 15 Apr 2013 14:42:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URoMe-0002QL-Mv for qemu-devel@nongnu.org; Mon, 15 Apr 2013 14:42:56 -0400 Received: from mail-qe0-f49.google.com ([209.85.128.49]:41359) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URoMe-0002QA-Id for qemu-devel@nongnu.org; Mon, 15 Apr 2013 14:42:52 -0400 Received: by mail-qe0-f49.google.com with SMTP id 6so2878079qeb.36 for ; Mon, 15 Apr 2013 11:42:52 -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=Yw1QixIe16Ry6qxWCYAO1KkcK+Y31Nt9D8yZ5dz5b2I=; b=D6jRswJ76Mb8vcR7ug61bKSiqB3Z2Eb6E2dxYZS1arixwUATw/2pnktyhotOeIjqbS R+nhd5kbjs8iS4GToXX53t2LU/VDGI5U0shqWTBqkjQeRDUIVbvOKZaKfgAkEpI4HitJ 0ZPTe8j5aUK9dahKENi9TYM/+JLm7EcxBNxE4GW6S6RV77tNeCTCDdg9O8WVm5GojCu9 1I4QkM+nupf9/e8pn/u4zdxkCnVu4pLwtUaSk4aWifmMZnECSWXngsOzwyPr39CYxWTt IvpB+n36enPbhgz+EveAgrxPFqZZIVb+AN2Q3YcN/Hk5mWeN4EV17aKkn03AEVSc+i7j JtOw== X-Received: by 10.229.169.6 with SMTP id w6mr359395qcy.123.1366051372158; Mon, 15 Apr 2013 11:42:52 -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.42.47 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 15 Apr 2013 11:42:51 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 15 Apr 2013 20:40:45 +0200 Message-Id: <1366051272-12979-7-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.49 Cc: av1474@comtv.ru, aurelien@aurel32.net Subject: [Qemu-devel] [PATCH v5 06/33] tcg-ppc64: Introduce and use tcg_out_shri64 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 Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- tcg/ppc64/tcg-target.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index 9199ac4..82e1da7 100644 --- a/tcg/ppc64/tcg-target.c +++ b/tcg/ppc64/tcg-target.c @@ -461,6 +461,11 @@ static inline void tcg_out_shli64(TCGContext *s, TCGReg dst, TCGReg src, int c) tcg_out_rld(s, RLDICR, dst, src, c, 63 - c); } +static inline void tcg_out_shri64(TCGContext *s, TCGReg dst, TCGReg src, int c) +{ + tcg_out_rld(s, RLDICL, dst, src, 64 - c, c); +} + static void tcg_out_movi32(TCGContext *s, TCGReg ret, int32_t arg) { if (arg == (int16_t) arg) @@ -864,7 +869,7 @@ static void tcg_out_qemu_st (TCGContext *s, const TCGArg *args, int opc) if (bswap) { tcg_out32 (s, STWBRX | SAB (data_reg, rbase, r0)); tcg_out32 (s, ADDI | RT (r1) | RA (r0) | 4); - tcg_out_rld (s, RLDICL, 0, data_reg, 32, 0); + tcg_out_shri64(s, 0, data_reg, 32); tcg_out32 (s, STWBRX | SAB (0, rbase, r1)); } else tcg_out32 (s, STDX | SAB (data_reg, rbase, r0)); @@ -1455,7 +1460,7 @@ static void tcg_out_op (TCGContext *s, TCGOpcode opc, const TCGArg *args, break; case INDEX_op_shr_i64: if (const_args[2]) - tcg_out_rld (s, RLDICL, args[0], args[1], 64 - args[2], args[2]); + tcg_out_shri64(s, args[0], args[1], args[2]); else tcg_out32 (s, SRD | SAB (args[1], args[0], args[2])); break;