From patchwork Fri Oct 19 13:06:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 12371 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 6FD7B23F58 for ; Fri, 19 Oct 2012 13:07:08 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 23958A18C28 for ; Fri, 19 Oct 2012 13:07:08 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so528987iej.11 for ; Fri, 19 Oct 2012 06:07:07 -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=fQ8OuZ4lnAtYh6His8MS0g9ikJ06WDxMJaVwpu5tK/7arfmApnqskLXHtlLz43N8Dy ECVJC8FaoMMtzMpHLMA8Rx4lBMkEss9ZPl3tuipMREcVAQYy/NKaDLa4gap/q5EguhHR Efld1ZUTepvD/K9avp4Q7W4Dw27vPfBggJ/+pYajBszYDSkBHIK0fofheyFMPMokPhq/ 0cUkbj/1ASQS5F6TkrA/yfUFiBJH+4JBNrxugrNQou5Z6bh8wmEi8pPbyY22+e4UEIus DQxlqRa2MEvFcFXwm7i3BKhJF9C0V+Jzi40BlkKZGjh958uWfiFFY8+Ia6+p5RdlOzvA lszQ== Received: by 10.43.7.132 with SMTP id oo4mr985648icb.6.1350652027527; Fri, 19 Oct 2012 06:07:07 -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 n20csp83102igt; Fri, 19 Oct 2012 06:07:06 -0700 (PDT) Received: by 10.204.11.141 with SMTP id t13mr427158bkt.65.1350652026206; Fri, 19 Oct 2012 06:07:06 -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 go18si2505691bkc.145.2012.10.19.06.07.05 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 19 Oct 2012 06:07:06 -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 1TPCHz-0006kx-ER; Fri, 19 Oct 2012 14:06:59 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org Subject: [PATCH v2 1/2] target-arm: Use TCG operation for Neon 64 bit negation Date: Fri, 19 Oct 2012 14:06:58 +0100 Message-Id: <1350652019-25946-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1350652019-25946-1-git-send-email-peter.maydell@linaro.org> References: <1350652019-25946-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQkAS2c9vYWSzCvFLh88jIbtQh97AI7/bSgr9DTRgmMnevpQ8yxLMd4qw7YUB/rvsS81x7Ra Use the TCG operation to do Neon 64 bit negations rather than calling a helper routine for it. Signed-off-by: Peter Maydell Reviewed-by: Aurelien Jarno --- 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(); } }