From patchwork Mon Mar 17 22:12:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 26432 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f69.google.com (mail-pb0-f69.google.com [209.85.160.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0890A202FA for ; Mon, 17 Mar 2014 22:28:40 +0000 (UTC) Received: by mail-pb0-f69.google.com with SMTP id md12sf15802549pbc.8 for ; Mon, 17 Mar 2014 15:28:40 -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:date:message-id:in-reply-to :references:mime-version: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:content-type :content-transfer-encoding; bh=ORZDk+/mj0mWQntyjwnoBptUN2506iE8u8DbjQjF3mA=; b=Z6FFeeTbfEqOjMjb2SdRLfzh+ohQpD8swdfKwtT9QzsykhD2aVJ8WbOf+kGazNVpU1 7JcVhLVZu3p6kR2CNx/vyNyUq63+aDPEyK4H3DtrQYBdY5sbO7OvoyoAbuz8Nfi0F74k QPoKhBpEB6P09d+sVUEbMxt0jbB2p/4kjCHVeqvgR4cvKWC1EKHX/xBZuvd9RcAfcJG+ tBtlPRJ9GVx3URUt0xJjLXV1q8XfY5zpjO+VAFgK/ytMWUWcwAUpzGSBbyNMg6SNhqYq z2Yi5LDAIdkgngssOYxntlw4s7W6t+uu01L8gTVavovrA1NYtC0f4SMlIkYBOdXTsaHc MpXQ== X-Gm-Message-State: ALoCoQlMzQOUyAjhQZZV6J/4JXtfEAcKeXeMVn/q2+bmqblqiP8cr8wEgbc7aU9eZYZlrz9VBFq5 X-Received: by 10.66.197.167 with SMTP id iv7mr10392694pac.12.1395095320312; Mon, 17 Mar 2014 15:28:40 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.87.233 with SMTP id r96ls1974777qgd.98.gmail; Mon, 17 Mar 2014 15:28:40 -0700 (PDT) X-Received: by 10.52.171.68 with SMTP id as4mr18505547vdc.0.1395095320155; Mon, 17 Mar 2014 15:28:40 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id a15si3122230vew.115.2014.03.17.15.28.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Mar 2014 15:28:40 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.179 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.179; Received: by mail-vc0-f179.google.com with SMTP id ij19so6330150vcb.24 for ; Mon, 17 Mar 2014 15:28:40 -0700 (PDT) X-Received: by 10.52.251.199 with SMTP id zm7mr18551673vdc.21.1395095320073; Mon, 17 Mar 2014 15:28:40 -0700 (PDT) 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.220.78.9 with SMTP id i9csp160048vck; Mon, 17 Mar 2014 15:28:39 -0700 (PDT) X-Received: by 10.224.147.77 with SMTP id k13mr31501373qav.64.1395095319632; Mon, 17 Mar 2014 15:28:39 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id m6si4326369qay.107.2014.03.17.15.28.39 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 17 Mar 2014 15:28:39 -0700 (PDT) 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]:60728 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPg1P-00072A-7N for patch@linaro.org; Mon, 17 Mar 2014 18:28:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPg0c-00069A-26 for qemu-devel@nongnu.org; Mon, 17 Mar 2014 18:27:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPg0b-0003vQ-0D for qemu-devel@nongnu.org; Mon, 17 Mar 2014 18:27:49 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:46994) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPg0a-0003vL-OO for qemu-devel@nongnu.org; Mon, 17 Mar 2014 18:27:48 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WPfld-00052y-IZ; Mon, 17 Mar 2014 22:12:21 +0000 From: Peter Maydell To: Anthony Liguori Date: Mon, 17 Mar 2014 22:12:00 +0000 Message-Id: <1395094341-19339-10-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1395094341-19339-1-git-send-email-peter.maydell@linaro.org> References: <1395094341-19339-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: Blue Swirl , =?UTF-8?q?Andreas=20F=C3=A4rber?= , qemu-devel@nongnu.org, Aurelien Jarno Subject: [Qemu-devel] [PULL 09/30] target-arm: A64: Add FSQRT to C3.6.17 (two misc) 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: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.179 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 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 Reviewed-by: Richard Henderson Message-id: 1394822294-14837-5-git-send-email-peter.maydell@linaro.org --- 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 550decc..427f484 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(); }