From patchwork Thu Apr 4 22:56:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 233984 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 435232C00A3 for ; Fri, 5 Apr 2013 10:09:29 +1100 (EST) Received: from localhost ([::1]:57921 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNtHb-0006ff-BN for incoming@patchwork.ozlabs.org; Thu, 04 Apr 2013 19:09:27 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNt65-0006H2-Ni for qemu-devel@nongnu.org; Thu, 04 Apr 2013 18:57:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNt5z-0001Os-EG for qemu-devel@nongnu.org; Thu, 04 Apr 2013 18:57:33 -0400 Received: from mail-ob0-x22d.google.com ([2607:f8b0:4003:c01::22d]:63286) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNt5z-0001Oh-19 for qemu-devel@nongnu.org; Thu, 04 Apr 2013 18:57:27 -0400 Received: by mail-ob0-f173.google.com with SMTP id wn14so2112079obc.4 for ; Thu, 04 Apr 2013 15:57:26 -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=/IqeEyR3e9gOhzs/9S1vZs2sI35ZgX2GdgEbFLLBCPo=; b=eRLSdWCNJnWnp4tT0kZqb/ZGvdmL7KYK13TaL+1LetkL+eHl9mujI0gNXo9wdbKaiB akVtiRdWn1cKx+oBDYPnmWjcmDvcQyU8vT8kLx1hDkzhGuWuCWEAx798UFaMY9aVRHKA E27zmwIKMpb1AVLB+9kfxA6AF1xcxg/s6zDUsIFqv9cnPXmXwnTQy00rHyq0rq+mkMae h9d85EMDfmPBRiHBAl5iWMVjqDNFeh7n3yQJwXUu+9EFyrGJ36wW3XzQl7qA9Lv5YMBk f/QcOBIyZVJ1Ljp+nimWcBu4mqsuG3saMbtA+Kt8ZN2wz5oYpDuYn93CfMdLIGV0aXMU 5dFQ== X-Received: by 10.182.192.3 with SMTP id hc3mr6007814obc.41.1365116246374; Thu, 04 Apr 2013 15:57:26 -0700 (PDT) Received: from pebble.com ([12.236.175.36]) by mx.google.com with ESMTPS id j10sm9227424obg.4.2013.04.04.15.57.24 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 04 Apr 2013 15:57:25 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 4 Apr 2013 17:56:16 -0500 Message-Id: <1365116186-19382-24-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1365116186-19382-1-git-send-email-rth@twiddle.net> References: <1365116186-19382-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:4003:c01::22d Cc: av1474@comtv.ru, Aurelien Jarno Subject: [Qemu-devel] [PATCH v4 23/33] tcg-ppc64: Implement deposit 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 | 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 7c326c5..909ba3c 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