From patchwork Thu Feb 8 17:31:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 127703 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1724488ljc; Thu, 8 Feb 2018 09:58:31 -0800 (PST) X-Google-Smtp-Source: AH8x225UZcQf7bLMMp2SUGgo+9jCD7tYZGtlmqU9Pxab5t8tSvXuTBHPaZ3/YY8Tvo8kXenBhVhW X-Received: by 10.37.29.9 with SMTP id d9mr960ybd.277.1518112711391; Thu, 08 Feb 2018 09:58:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518112711; cv=none; d=google.com; s=arc-20160816; b=yusE7BkguPGEnZxJ9g1Q03IpccNXK5NKc69XsQwFTQcvhOZvq6wHOWpVkBg57HBqa2 mxFvl7pn2nzkQq1iQQ7LNY2XqmOlvqMjUGMWwLjF42L4j+nLGWiasbXjj4A6LRDLB4NR 04Uuq2KVWuorFvy6JhJI7sx1b9xRMxJ979R9G2U6/gRoHB8+hdUcihp/99YMkr1m+ofr ttwaR2lF+fpen3FzAai3ybfC1hZEkpaTbsQRWJw93B79bopnv0PZJ6bWJsVi65ogsGC8 o2D7uVBkqhMG6btWZbb1I2YMIWjW3Oz0wujO9eUthRIpYd6Xfik+oowzG3lI8N2V0nW0 cm5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=Zy4Ft/IrAMI0aOg/zaIL2BU3SA6ZNZ5xx47jSNKWl88=; b=PStyVRzcyKy8x3ENdiRwfxtQQ0IucmLsaUrP4tz3TVP14k79XXjsalqrMZYLYeFlVz keitaj+KzN3NBGZb4BhfG6wL1hQzu33fZzu9iMAhXqWVACY4bc7+hVzfEQugSeD+u73r IiL29MqfVee9NPmq/hmjPsFh/2zud8yZE0ZdQhYkuOlYTbEP692ddVNNDgdIpZqgkNir Cdbk12dN4GSNAhpDKTIad7EYSPM0tLmqVM4F9m/5Xx2NPnEyTY4yLzbiv7/seOH7iK2R laE/oWsuApgk+8pAkqjH4gql9/rWMk0cNBujMw7jbIgkO/dm/93+bqayGibdxF6h4yCq 0/7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=fbwcw4D5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 191si83267ybm.381.2018.02.08.09.58.31 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 08 Feb 2018 09:58:31 -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; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=fbwcw4D5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:57730 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ejqSs-0000xZ-P2 for patch@linaro.org; Thu, 08 Feb 2018 12:58:30 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ejq3T-0003Q0-8L for qemu-devel@nongnu.org; Thu, 08 Feb 2018 12:32:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ejq3R-0006re-Ms for qemu-devel@nongnu.org; Thu, 08 Feb 2018 12:32:15 -0500 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:40756) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ejq3R-0006qJ-Dw for qemu-devel@nongnu.org; Thu, 08 Feb 2018 12:32:13 -0500 Received: by mail-wr0-x242.google.com with SMTP id o76so2443512wrb.7 for ; Thu, 08 Feb 2018 09:32:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Zy4Ft/IrAMI0aOg/zaIL2BU3SA6ZNZ5xx47jSNKWl88=; b=fbwcw4D5nww7SBRQrQSfzNboucqxCgqnPncn+pFKO/hwLxCAn+mRN5xztW0I6nwJvg 163Dpjd8D/Pqut5rodTCeSTslsw8OsL++EWHr5LodPYmQKGE9s8xAhp2LTjp1GHIhZg7 H0+jdhrmJxX0DoEMJLwxY1gOEfeqOo6yfAeA8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Zy4Ft/IrAMI0aOg/zaIL2BU3SA6ZNZ5xx47jSNKWl88=; b=RBs6U76KmH6NhRoefPX/6nEb/UYT90C4VDN6beZTaSbK+nZC4VZKwKdOQ1m+zGIrt2 4owlukqIjLebdO76ESvr1fgWvpX4o6rnGhiCxxGw93eE0u6vBWP+EgCtP5I7I6NPIfhq czyxuKLwjpJZmrMK71NRIKseCCvaGUNDdyiaB4VB2GZjaizCtVnrditkoXhwm/ndyk2k rWcB0NXGe6t1hIGqV2q2f+NcIk0VTwWvgpeIvswLYeJRXjnbUplFsS7qDGOqSzQJf/bj QK6RmOy0XrEXji4/yHz4f7zBnNIJ6oeOjVmbrW+mOkt2ViHZTeZspC56VNCbsX/4eibu HTOQ== X-Gm-Message-State: APf1xPAjM3UUeGZrOx2TmvKO1m8nlNG9cCR/6/hK4dRZMzzYRQboHF84 I/ajt/usmNEQvP3ENkkqOdCOmA== X-Received: by 10.223.195.201 with SMTP id d9mr1490312wrg.134.1518111132365; Thu, 08 Feb 2018 09:32:12 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id i33sm487826wri.70.2018.02.08.09.32.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Feb 2018 09:32:08 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id AB9EB3E0F56; Thu, 8 Feb 2018 17:31:59 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-arm@nongnu.org Date: Thu, 8 Feb 2018 17:31:51 +0000 Message-Id: <20180208173157.24705-27-alex.bennee@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180208173157.24705-1-alex.bennee@linaro.org> References: <20180208173157.24705-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::242 Subject: [Qemu-devel] [PATCH v2 26/32] arm/translate-a64: add FP16 FSQRT to simd_two_reg_misc_fp16 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Alex Bennée --- v2 remove superfluous helpers --- target/arm/helper-a64.c | 13 +++++++++++++ target/arm/helper-a64.h | 1 + target/arm/translate-a64.c | 5 +++++ 3 files changed, 19 insertions(+) -- 2.15.1 Reviewed-by: Richard Henderson diff --git a/target/arm/helper-a64.c b/target/arm/helper-a64.c index 38cdc13b3e..7952a6bfff 100644 --- a/target/arm/helper-a64.c +++ b/target/arm/helper-a64.c @@ -833,3 +833,16 @@ uint32_t HELPER(advsimd_f16touinth)(float16 a, void *fpstp) } return float16_to_uint16(a, fpst); } + +/* + * Square Root and Reciprocal square root + */ + +float16 HELPER(sqrt_f16)(float16 a, void *fpstp) +{ + float_status *s = fpstp; + + return float16_sqrt(a, s); +} + + diff --git a/target/arm/helper-a64.h b/target/arm/helper-a64.h index d8a55142b5..905125bab1 100644 --- a/target/arm/helper-a64.h +++ b/target/arm/helper-a64.h @@ -81,3 +81,4 @@ DEF_HELPER_2(advsimd_rinth_exact, f16, f16, ptr) DEF_HELPER_2(advsimd_rinth, f16, f16, ptr) DEF_HELPER_2(advsimd_f16tosinth, i32, f16, ptr) DEF_HELPER_2(advsimd_f16touinth, i32, f16, ptr) +DEF_HELPER_2(sqrt_f16, f16, f16, ptr) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index b6cd4dd8f2..587d072d27 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -10925,6 +10925,8 @@ static void disas_simd_two_reg_misc_fp16(DisasContext *s, uint32_t insn) case 0x6f: /* FNEG */ need_fpst = false; break; + case 0x7f: /* FSQRT (vector) */ + break; default: fprintf(stderr, "%s: insn %#04x fpop %#2x\n", __func__, insn, fpop); g_assert_not_reached(); @@ -11039,6 +11041,9 @@ static void disas_simd_two_reg_misc_fp16(DisasContext *s, uint32_t insn) case 0x6f: /* FNEG */ tcg_gen_xori_i32(tcg_res, tcg_op, 0x8000); break; + case 0x7f: /* FSQRT */ + gen_helper_sqrt_f16(tcg_res, tcg_op, tcg_fpstatus); + break; default: g_assert_not_reached(); }