Received: from eggs.gnu.org ([208.118.235.92]:45893) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCfov-0005Gb-8W for qemu-devel@nongnu.org; Mon, 04 Mar 2013 19:33:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCfos-00046I-VC for qemu-devel@nongnu.org; Mon, 04 Mar 2013 19:33:29 -0500 Received: from mail-ia0-x22c.google.com ([2607:f8b0:4001:c02::22c]:38146) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCfos-00046B-Q4 for qemu-devel@nongnu.org; Mon, 04 Mar 2013 19:33:26 -0500 Received: by mail-ia0-f172.google.com with SMTP id l29so5526241iag.31 for ; Mon, 04 Mar 2013 16:33:26 -0800 (PST) Sender: Richard Henderson From: Richard Henderson Date: Mon, 4 Mar 2013 16:32:49 -0800 Message-Id: <1362443590-28191-7-git-send-email-rth@twiddle.net> In-Reply-To: <1362443590-28191-1-git-send-email-rth@twiddle.net> References: <1362443590-28191-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH v2 06/27] tcg-ppc64: Introduce and use tcg_out_shri64 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: av1474@comtv.ru 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; -- 1.8.1.2