From patchwork Tue Jan 14 16:43:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Newton X-Patchwork-Id: 23195 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D0E382066C for ; Tue, 14 Jan 2014 16:46:28 +0000 (UTC) Received: by mail-ob0-f197.google.com with SMTP id va2sf5470280obc.0 for ; Tue, 14 Jan 2014 08:46:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=j32lR9B+99e9JjhmRawapROH2xdzaxSQnHntt4JsslU=; b=ln5KlZVyj/IkIPpEJlfM3X2ShQsOwXcdLdUlq55IMqsYY9tmciFFBobGxD9PGT6ydi ploqigf4zjV5kz7bLCPPRikv6HkjLDm/Eu4pa+rWWVhW07jwtxRePsZ3OeexyTpKfBYA YuiNNsdlSes7yKjZK/mPNmf+/uCc4xN+HxmQDnDRVdbal3FOcJacq7YT/6HJIZh0mWqw 5+NreTdrS0EGYSrPms7+24GMx7YCQ5aWPFQ9fSUg8KykSbzkARQoSK1YdDpMqr29Ink8 giSSEkeU3dwiIje2rMsTKG4uOHICD3XH0w78VjVF5Z+LqAoCZM+lEHZioexlM8vPN7uv 8JKw== X-Gm-Message-State: ALoCoQll/aoLUd07oY51XBo+5Y78bgiu/SdCuyqwir8xnhBANeVRTwt7nPlkWJbWLiLhtJQdjSD8 X-Received: by 10.42.146.201 with SMTP id k9mr11131127icv.26.1389717988009; Tue, 14 Jan 2014 08:46:28 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.40.164 with SMTP id y4ls190857qek.89.gmail; Tue, 14 Jan 2014 08:46:27 -0800 (PST) X-Received: by 10.58.211.130 with SMTP id nc2mr21057642vec.7.1389717987915; Tue, 14 Jan 2014 08:46:27 -0800 (PST) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id l2si449512vcf.43.2014.01.14.08.46.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 Jan 2014 08:46:27 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id ks9so362250vcb.25 for ; Tue, 14 Jan 2014 08:46:27 -0800 (PST) X-Received: by 10.58.181.71 with SMTP id du7mr1585160vec.25.1389717987854; Tue, 14 Jan 2014 08:46:27 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp214806ved; Tue, 14 Jan 2014 08:46:27 -0800 (PST) X-Received: by 10.224.124.74 with SMTP id t10mr4702299qar.40.1389717987113; Tue, 14 Jan 2014 08:46:27 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id r8si1371531qey.30.2014.01.14.08.46.26 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 14 Jan 2014 08:46:27 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:49229 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W378E-0005b5-NY for patch@linaro.org; Tue, 14 Jan 2014 11:46:26 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W375W-0002BA-GJ for qemu-devel@nongnu.org; Tue, 14 Jan 2014 11:43:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W375P-0001Kd-Jb for qemu-devel@nongnu.org; Tue, 14 Jan 2014 11:43:38 -0500 Received: from mail-wi0-f178.google.com ([209.85.212.178]:35752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W375P-0001KV-D2 for qemu-devel@nongnu.org; Tue, 14 Jan 2014 11:43:31 -0500 Received: by mail-wi0-f178.google.com with SMTP id cc10so987271wib.11 for ; Tue, 14 Jan 2014 08:43:30 -0800 (PST) X-Received: by 10.194.6.42 with SMTP id x10mr28219742wjx.17.1389717810468; Tue, 14 Jan 2014 08:43:30 -0800 (PST) Received: from localhost.localdomain (cpc6-seac21-2-0-cust453.7-2.cable.virginm.net. [82.1.113.198]) by mx.google.com with ESMTPSA id jw4sm971156wjc.20.2014.01.14.08.43.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Jan 2014 08:43:29 -0800 (PST) From: Will Newton To: qemu-devel@nongnu.org Date: Tue, 14 Jan 2014 16:43:09 +0000 Message-Id: <1389717790-30860-9-git-send-email-will.newton@linaro.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1389717790-30860-1-git-send-email-will.newton@linaro.org> References: <1389717790-30860-1-git-send-email-will.newton@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.212.178 Cc: Peter Maydell Subject: [Qemu-devel] [PATCH 8/9] target-arm: Add support for AArch32 SIMD VRINTZ 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: will.newton@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Add support for the AArch32 Advanced SIMD VRINTZ instruction. Signed-off-by: Will Newton Reviewed-by: Peter Maydell --- target-arm/translate.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/target-arm/translate.c b/target-arm/translate.c index b6d11db..16242d3 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -4710,6 +4710,7 @@ static const uint8_t neon_3r_sizes[] = { #define NEON_2RM_VQMOVN 37 /* Includes VQMOVUN */ #define NEON_2RM_VSHLL 38 #define NEON_2RM_VRINTX 41 +#define NEON_2RM_VRINTZ 43 #define NEON_2RM_VCVT_F16_F32 44 #define NEON_2RM_VCVT_F32_F16 46 #define NEON_2RM_VRECPE 56 @@ -4725,7 +4726,8 @@ static int neon_2rm_is_float_op(int op) { /* Return true if this neon 2reg-misc op is float-to-float */ return (op == NEON_2RM_VABS_F || op == NEON_2RM_VNEG_F || - op == NEON_2RM_VRINTX || op >= NEON_2RM_VRECPE_F); + op == NEON_2RM_VRINTX || op == NEON_2RM_VRINTZ || + op >= NEON_2RM_VRECPE_F); } /* Each entry in this array has bit n set if the insn allows @@ -4770,6 +4772,7 @@ static const uint8_t neon_2rm_sizes[] = { [NEON_2RM_VQMOVN] = 0x7, [NEON_2RM_VSHLL] = 0x7, [NEON_2RM_VRINTX] = 0x4, + [NEON_2RM_VRINTZ] = 0x4, [NEON_2RM_VCVT_F16_F32] = 0x2, [NEON_2RM_VCVT_F32_F16] = 0x2, [NEON_2RM_VRECPE] = 0x4, @@ -6489,6 +6492,20 @@ static int disas_neon_data_insn(CPUARMState * env, DisasContext *s, uint32_t ins tcg_temp_free_ptr(fpstatus); break; } + case NEON_2RM_VRINTZ: + { + TCGv_i32 tcg_rmode; + TCGv_ptr fpstatus = get_fpstatus_ptr(1); + tcg_rmode = tcg_const_i32(float_round_to_zero); + gen_helper_set_neon_rmode(tcg_rmode, tcg_rmode, + cpu_env); + gen_helper_rints(cpu_F0s, cpu_F0s, fpstatus); + gen_helper_set_neon_rmode(tcg_rmode, tcg_rmode, + cpu_env); + tcg_temp_free_ptr(fpstatus); + tcg_temp_free_i32(tcg_rmode); + break; + } case NEON_2RM_VRECPE: gen_helper_recpe_u32(tmp, tmp, cpu_env); break;