From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URoOc-0000Yn-Gx for qemu-devel@nongnu.org; Mon, 15 Apr 2013 14:44:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URoOZ-0002yP-KC for qemu-devel@nongnu.org; Mon, 15 Apr 2013 14:44:54 -0400 Received: from mail-qe0-f52.google.com ([209.85.128.52]:44610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URoOZ-0002xu-Gs for qemu-devel@nongnu.org; Mon, 15 Apr 2013 14:44:51 -0400 Received: by mail-qe0-f52.google.com with SMTP id jy17so2851583qeb.25 for ; Mon, 15 Apr 2013 11:44:51 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Mon, 15 Apr 2013 20:41:02 +0200 Message-Id: <1366051272-12979-24-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 23/33] tcg-ppc64: Implement deposit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: av1474@comtv.ru, aurelien@aurel32.net Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- tcg/ppc64/tcg-target.c | 12 ++++++++++++ tcg/ppc64/tcg-target.h | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index 1cd2153..4405178 100644 --- a/tcg/ppc64/tcg-target.c +++ b/tcg/ppc64/tcg-target.c @@ -1796,6 +1796,15 @@ static void tcg_out_op (TCGContext *s, TCGOpcode opc, const TCGArg *args, } break; + case INDEX_op_deposit_i32: + tcg_out_rlw(s, RLWIMI, args[0], args[2], args[3], + 32 - args[3] - args[4], 31 - args[3]); + break; + case INDEX_op_deposit_i64: + tcg_out_rld(s, RLDIMI, args[0], args[2], args[3], + 64 - args[3] - args[4]); + break; + default: tcg_dump_ops (s); tcg_abort (); @@ -1917,6 +1926,9 @@ static const TCGTargetOpDef ppc_op_defs[] = { { INDEX_op_bswap32_i64, { "r", "r" } }, { INDEX_op_bswap64_i64, { "r", "r" } }, + { INDEX_op_deposit_i32, { "r", "0", "r" } }, + { INDEX_op_deposit_i64, { "r", "0", "r" } }, + { -1 }, }; diff --git a/tcg/ppc64/tcg-target.h b/tcg/ppc64/tcg-target.h index 6ea4541..7ffa895 100644 --- a/tcg/ppc64/tcg-target.h +++ b/tcg/ppc64/tcg-target.h @@ -88,7 +88,7 @@ typedef enum { #define TCG_TARGET_HAS_eqv_i32 1 #define TCG_TARGET_HAS_nand_i32 1 #define TCG_TARGET_HAS_nor_i32 1 -#define TCG_TARGET_HAS_deposit_i32 0 +#define TCG_TARGET_HAS_deposit_i32 1 #define TCG_TARGET_HAS_movcond_i32 0 #define TCG_TARGET_HAS_add2_i32 0 #define TCG_TARGET_HAS_sub2_i32 0 @@ -110,7 +110,7 @@ typedef enum { #define TCG_TARGET_HAS_eqv_i64 1 #define TCG_TARGET_HAS_nand_i64 1 #define TCG_TARGET_HAS_nor_i64 1 -#define TCG_TARGET_HAS_deposit_i64 0 +#define TCG_TARGET_HAS_deposit_i64 1 #define TCG_TARGET_HAS_movcond_i64 0 #define TCG_TARGET_HAS_add2_i64 0 #define TCG_TARGET_HAS_sub2_i64 0 -- 1.8.1.4