From patchwork Sun Mar 9 15:10:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 25932 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f198.google.com (mail-ob0-f198.google.com [209.85.214.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DACB721135 for ; Sun, 9 Mar 2014 15:11:18 +0000 (UTC) Received: by mail-ob0-f198.google.com with SMTP id wn1sf23898242obc.9 for ; Sun, 09 Mar 2014 08:11:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=lXdihsJ73Dn90+igf9W/udmGWHKCcqhTFO0G3yC/I5I=; b=iJi6RGo2REmoxk2DFqndNfEaA3A+Szhr9ilkN0mjU0uqT6U/t0ZcmHGALeiybTklB1 4YBYcaU4O/vzXhdrtmmSTs5V2fsVt5aFr+P4FGMTvIXmxUtil5l5JnGqKAN6wOx0QyRm vIafsq938WqIvmBuqWIZjgN542MVjNUfEs+s69vGgEtK9/Gmya4d7fDqgP7j2CqW6m53 R77wMUudjzOIuDMXJNQMH00Ha6PgbpBrpVRw9EZPBmfB3ueSg1gzvnVNM+ig4/BL+mJj pcthsbA3t10b6P/M08P1uqhMghItrRB7leU2VEVQww20KTZcUGAnUkeJuUsguX3D6Kb4 dbow== X-Gm-Message-State: ALoCoQmANrFJtNAIn2HRyQbo0flhFodYrOaHn3YEr8Z4kmeX7ouqO2h4VpAtzxboBLlfWwGNnNlx X-Received: by 10.182.213.5 with SMTP id no5mr11079568obc.15.1394377878516; Sun, 09 Mar 2014 08:11:18 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.24.226 with SMTP id 89ls1795349qgr.14.gmail; Sun, 09 Mar 2014 08:11:18 -0700 (PDT) X-Received: by 10.52.18.70 with SMTP id u6mr19636238vdd.11.1394377878385; Sun, 09 Mar 2014 08:11:18 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id ue9si3920049veb.92.2014.03.09.08.11.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 09 Mar 2014 08:11:18 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.181 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.181; Received: by mail-vc0-f181.google.com with SMTP id lg15so5936154vcb.40 for ; Sun, 09 Mar 2014 08:11:18 -0700 (PDT) X-Received: by 10.58.200.229 with SMTP id jv5mr18637353vec.15.1394377878310; Sun, 09 Mar 2014 08:11:18 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.78.9 with SMTP id i9csp64520vck; Sun, 9 Mar 2014 08:11:17 -0700 (PDT) X-Received: by 10.68.181.165 with SMTP id dx5mr5868pbc.38.1394377875947; Sun, 09 Mar 2014 08:11:15 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id wh4si14041576pbc.147.2014.03.09.08.11.13 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 09 Mar 2014 08:11:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::1 as permitted sender) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WMfNb-0001rU-Sq; Sun, 09 Mar 2014 15:11:07 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Alexander Graf , Michael Matz , Dirk Mueller , Laurent Desnogues , kvmarm@lists.cs.columbia.edu, Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Christoffer Dall , Will Newton , Peter Crosthwaite Subject: [PATCH 04/16] target-arm: A64: Add FSQRT to C3.6.17 (two misc) Date: Sun, 9 Mar 2014 15:10:55 +0000 Message-Id: <1394377867-7115-5-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1394377867-7115-1-git-send-email-peter.maydell@linaro.org> References: <1394377867-7115-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.181 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 Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Alex Bennée Implement FSQRT in the two-reg-misc category. GCC uses this instruction form. Signed-off-by: Alex Bennée Signed-off-by: Peter Maydell --- target-arm/translate-a64.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c index da4063b..8313f7f 100644 --- a/target-arm/translate-a64.c +++ b/target-arm/translate-a64.c @@ -6623,6 +6623,9 @@ static void handle_2misc_64(DisasContext *s, int opcode, bool u, case 0x6f: /* FNEG */ gen_helper_vfp_negd(tcg_rd, tcg_rn); break; + case 0x7f: /* FSQRT */ + gen_helper_vfp_sqrtd(tcg_rd, tcg_rn, cpu_env); + break; default: g_assert_not_reached(); } @@ -8392,6 +8395,12 @@ static void disas_simd_two_reg_misc(DisasContext *s, uint32_t insn) } handle_2misc_fcmp_zero(s, opcode, false, u, is_q, size, rn, rd); return; + case 0x7f: /* FSQRT */ + if (size == 3 && !is_q) { + unallocated_encoding(s); + return; + } + break; case 0x16: /* FCVTN, FCVTN2 */ case 0x17: /* FCVTL, FCVTL2 */ case 0x18: /* FRINTN */ @@ -8416,7 +8425,6 @@ static void disas_simd_two_reg_misc(DisasContext *s, uint32_t insn) case 0x7b: /* FCVTZU */ case 0x7c: /* URSQRTE */ case 0x7d: /* FRSQRTE */ - case 0x7f: /* FSQRT */ unsupported_encoding(s, insn); return; default: @@ -8493,6 +8501,9 @@ static void disas_simd_two_reg_misc(DisasContext *s, uint32_t insn) case 0x6f: /* FNEG */ gen_helper_vfp_negs(tcg_res, tcg_op); break; + case 0x7f: /* FSQRT */ + gen_helper_vfp_sqrts(tcg_res, tcg_op, cpu_env); + break; default: g_assert_not_reached(); }