From patchwork Thu Oct 18 17:26:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 192393 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 D15792C008D for ; Fri, 19 Oct 2012 04:27:13 +1100 (EST) Received: from localhost ([::1]:36859 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOtsF-0002rm-RO for incoming@patchwork.ozlabs.org; Thu, 18 Oct 2012 13:27:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOtrz-0002eo-Fg for qemu-devel@nongnu.org; Thu, 18 Oct 2012 13:26:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOtrr-0002a7-Pp for qemu-devel@nongnu.org; Thu, 18 Oct 2012 13:26:55 -0400 Received: from 38.0.169.217.in-addr.arpa ([217.169.0.38]:32886 helo=mnementh.archaic.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOtrr-0002ZW-Iu for qemu-devel@nongnu.org; Thu, 18 Oct 2012 13:26:47 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1TOtro-0006Mv-Hf; Thu, 18 Oct 2012 18:26:44 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 18 Oct 2012 18:26:43 +0100 Message-Id: <1350581204-24456-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1350581204-24456-1-git-send-email-peter.maydell@linaro.org> References: <1350581204-24456-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 217.169.0.38 Cc: patches@linaro.org Subject: [Qemu-devel] [PATCH 1/2] target-arm: Use TCG operation for Neon 64 bit negation 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 Use the TCG operation to do Neon 64 bit negations rather than calling a helper routine for it. Signed-off-by: Peter Maydell --- target-arm/helper.h | 1 - target-arm/neon_helper.c | 6 ------ target-arm/translate.c | 4 +++- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/target-arm/helper.h b/target-arm/helper.h index 8b9adf1..fa3472f 100644 --- a/target-arm/helper.h +++ b/target-arm/helper.h @@ -339,7 +339,6 @@ DEF_HELPER_2(neon_mull_s16, i64, i32, i32) DEF_HELPER_1(neon_negl_u16, i64, i64) DEF_HELPER_1(neon_negl_u32, i64, i64) -DEF_HELPER_1(neon_negl_u64, i64, i64) DEF_HELPER_2(neon_qabs_s8, i32, env, i32) DEF_HELPER_2(neon_qabs_s16, i32, env, i32) diff --git a/target-arm/neon_helper.c b/target-arm/neon_helper.c index 8bb5129..616cf95 100644 --- a/target-arm/neon_helper.c +++ b/target-arm/neon_helper.c @@ -1665,12 +1665,6 @@ uint64_t HELPER(neon_negl_u32)(uint64_t x) return low | ((uint64_t)high << 32); } -/* FIXME: There should be a native op for this. */ -uint64_t HELPER(neon_negl_u64)(uint64_t x) -{ - return -x; -} - /* Saturating sign manipulation. */ /* ??? Make these use NEON_VOP1 */ #define DO_QABS8(x) do { \ diff --git a/target-arm/translate.c b/target-arm/translate.c index daccb15..d33f94c 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -4184,7 +4184,9 @@ static inline void gen_neon_negl(TCGv_i64 var, int size) switch (size) { case 0: gen_helper_neon_negl_u16(var, var); break; case 1: gen_helper_neon_negl_u32(var, var); break; - case 2: gen_helper_neon_negl_u64(var, var); break; + case 2: + tcg_gen_neg_i64(var, var); + break; default: abort(); } }