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: 12356 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 5C473241AD for ; Thu, 18 Oct 2012 17:26:49 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 0C743A1855D for ; Thu, 18 Oct 2012 17:26:48 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id f6so6304303iag.11 for ; Thu, 18 Oct 2012 10:26:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=BdfRrWHNHzRgJiMvxGvPKJUSSBhdFScdv/PrgunYsPg=; b=Nx/CVCztt2+D6t5BBoAJAFNL1cp7/x3nqyWXj7roqJwPTBraSBw4kKc2P/vKlJ5XPl yw0fo+DceDlirsdttWy/fI+GFsoV0S3RLjA5oBXNZ8F/CRBo0NzGqjqE1cCR8sj3ecEI CpjWrBz7v2hLQPjmoHTsolEdNonRgqorpdaiVaHceWdGWW+QKQk+NJOmOtyvxJ8xBgQn AtzP1g7pnjeYI++JmiyxTgeJBIErlQSwujJjDC6lvQkLx6+cBDj4xCly7hLOsstjBHig t5i2SJVKVmBs+cL7MmX5BR5wVKjMNdZVxNxWcb0xhkX+QPaZC6BU2TpQmdlxQ6taMuKd OhiA== Received: by 10.43.7.132 with SMTP id oo4mr17921289icb.6.1350581207800; Thu, 18 Oct 2012 10:26:47 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp1111562igt; Thu, 18 Oct 2012 10:26:47 -0700 (PDT) Received: by 10.181.13.208 with SMTP id fa16mr12842657wid.11.1350581206531; Thu, 18 Oct 2012 10:26:46 -0700 (PDT) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id b75si2350640wep.66.2012.10.18.10.26.45 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 18 Oct 2012 10:26:46 -0700 (PDT) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Authentication-Results: mx.google.com; spf=neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) smtp.mail=pm215@archaic.org.uk 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 Cc: patches@linaro.org Subject: [PATCH 1/2] target-arm: Use TCG operation for Neon 64 bit negation 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-Gm-Message-State: ALoCoQkQPP5Ph494gNn67hv7M4JRi8dF6j0fhRsZx42riyl9w0SqRxf5j1xOyVp2ctSsBMNLHS8f 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(); } }