From patchwork Tue Feb 20 16:59:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Ramsay X-Patchwork-Id: 86048 X-Patchwork-Delegate: maxim.kuvyrkov@gmail.com Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CB5BB3858402 for ; Tue, 20 Feb 2024 17:01:43 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2084.outbound.protection.outlook.com [40.107.7.84]) by sourceware.org (Postfix) with ESMTPS id 436DD3858D39 for ; Tue, 20 Feb 2024 17:00:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 436DD3858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 436DD3858D39 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.7.84 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1708448409; cv=pass; b=EGT47024BDrgOFUd8kY8t6/2FQL2bdAuxRejKZ5Ki7BUfjzP9M1iH22D+hVpG+ZCAmE30Vwo483g0LKjclyxn/7W58yQbeDMLDJmdMqepuccJDYO5rJ7RFm9XO995DyAOL3gjdc6Jofb3GW4pINIyDemI/x/9CR9lkXR3jVdFpo= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1708448409; c=relaxed/simple; bh=0wIGhkDLPH2+PIroJ9jRyyl8LN0YW8ym5zFrbBOkMzM=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=UC6y1UU4oiwa3ms/dqBqdHHv1N9qiRKg6n/WbHUBlmH6k3WrpDaI73UFVQ4x5H3Qql7+Q1HAWIoGvyhmIUjwnZvMOPE1IBw4u1jO5tQ9UvpLFUyW1IOG2SYEDFEKB+6er05EQhD8PVCkdfyXUJK9umF/ijbj37QZynXKqqFTuQ4= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=m8YAERUM72NwbMXNN/QnHMRFb06IPpCbzvNWVEYaid5eGU+tkkybtjyt9uNsYOS+1nTo+xgJc3Mg5RYL3hW0hNojgTnULFMcROBKtqBmXo4XIEQnNF/cOF1E2oq4tKppMF6H4KtSDpFapg/Of8RmewRi2byHt1EacCFJDD4b08pFh+ZZWrTt08twPjdIXdV9ubs2e8Lb8UCq6LvpijtNeesoBgZ/PBCI9T5dAiwSzlBy0cuX10lMYTQaHqFze1jmJkJn+1ObiiYCfrh8oZEtobZ++2QfXqmgwZvSOr6lH2Ic/2WErKaQZmtwvg9z+NkrY84P2IDhRzWo52eLRfYp9w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lZ/FfM/kqw1BvXGICrt0lHUa5PSInrN/SMEr1BBSZDk=; b=SzFuLLRKxAV/AYFXv8g9PQpTi/rYU6ij3FsJ7bvxJ7QBP9+of7sqyy/a7ebIl09eAqAnXs5EC9hVxtHqBh32VHNwIHizDQg4Zbmt9E9d0lIaRdrlGDrFe2RDExrETB522wN8eVgiSkloD8kx628t+Fqap60KYaiKKVf4tZQXslMc4fJm6+foZxf2x1FlGOQ1gu3uKDy6unLuKQu1eMVuQhYsEIkyH1ZKw0dtSQJ2+d5youfy31pBZqnCTj1rV5DgLaEDTIlVVp8yj1AXEv5/ESL2ZmW+dCLbyOGIn+3ewal/yEkCvIsAmZlQgYNG/HJnGb2KzBTOPUmtJntrVpPXUw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1, 1, smtp.mailfrom=arm.com] dmarc=[1, 1, header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lZ/FfM/kqw1BvXGICrt0lHUa5PSInrN/SMEr1BBSZDk=; b=fnfNC+wR1na9cigBPyPGJ2t0cGDDGbwe0dO3VBPDNvf+RkTgxxnK+U+NLUy2iagcIouwxPWwK/egbTFItWazkcbzi6WDoOCSy2B8bUArf+BkOMEi67s+/FJ/URu33pPSUnfLUVJt6avCFhIJoJvMjvQKEyZs4hOL/KjZs6slYVk= Received: from AS9PR05CA0342.eurprd05.prod.outlook.com (2603:10a6:20b:490::32) by AS8PR08MB8134.eurprd08.prod.outlook.com (2603:10a6:20b:54f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.39; Tue, 20 Feb 2024 17:00:01 +0000 Received: from AM3PEPF0000A79C.eurprd04.prod.outlook.com (2603:10a6:20b:490:cafe::a4) by AS9PR05CA0342.outlook.office365.com (2603:10a6:20b:490::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.39 via Frontend Transport; Tue, 20 Feb 2024 17:00:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM3PEPF0000A79C.mail.protection.outlook.com (10.167.16.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.25 via Frontend Transport; Tue, 20 Feb 2024 17:00:01 +0000 Received: ("Tessian outbound e358842a0ad8:v228"); Tue, 20 Feb 2024 17:00:00 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 9f6ab77ab6866e38 X-CR-MTA-TID: 64aa7808 Received: from 5278193e80a4.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id A937F297-B167-4129-B5C7-1A64034E9F3B.1; Tue, 20 Feb 2024 16:59:53 +0000 Received: from EUR02-AM0-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5278193e80a4.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 20 Feb 2024 16:59:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bm9DUDZbEyzFNSjKWwyRqWTbJyfwmAYUQh4gUebqdCIwU4BtRVsto+zffIEMTblzA7F9EFc/BuREypDJem7zYA50p/dIH6So176UvnvZBiMfDd7k4b9hmDxsblK/OJj1aneeGZRSVK2fSVIhzwX2k1kGyrqfv5v8IbjphEkB13BdHRI8Q9scU/lG6fJAsPbfsCeM87TU7roVotYjn0us1arc9sjiZAc8hOpWA8FG1sPv0X/QKXO0R47iKgQz4iLjtWTwNEbhCAHrRkiRQOj28FbaUxmeLLqo52wfvc4BDW+w2X83Mn3hoLtcMD4/6yzooCcRYo6frItE0glufH6rWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lZ/FfM/kqw1BvXGICrt0lHUa5PSInrN/SMEr1BBSZDk=; b=LSC1GtV49OIUfMTPNyyx4vgCrf/qLL+zd8YtRmcbSucO0bvJn/+M1BT967Y+dyJ87ndRv2KlWEyFfx7oHIvbTTNvbDetQRy3LKYpKTLRgZ7GW0Wk1xScagL7WRKDAPhUe8DY0YRq2Jt83e0vDuLft/hn6EvwVKkQQmCHEBEnqCfUkYGafUwKLvF9G+M4UHeexQDIMLxIKsqs3xInkPE8KnDlL+8HMFkLAcA+IXEWsW6tXrmKuv8MSIlf1YuaCYmD9J/UJs3rvZfRH0JwBLM65yEWXNNicQQAlXFfiWd/f80jiL2l1bFJ2qEz77yCuMpG/5OHbyJJo0kuwDR/TFJbxg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lZ/FfM/kqw1BvXGICrt0lHUa5PSInrN/SMEr1BBSZDk=; b=fnfNC+wR1na9cigBPyPGJ2t0cGDDGbwe0dO3VBPDNvf+RkTgxxnK+U+NLUy2iagcIouwxPWwK/egbTFItWazkcbzi6WDoOCSy2B8bUArf+BkOMEi67s+/FJ/URu33pPSUnfLUVJt6avCFhIJoJvMjvQKEyZs4hOL/KjZs6slYVk= Received: from AM9P250CA0020.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:21c::25) by GVXPR08MB10809.eurprd08.prod.outlook.com (2603:10a6:150:158::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.39; Tue, 20 Feb 2024 16:59:51 +0000 Received: from AM4PEPF00025F98.EURPRD83.prod.outlook.com (2603:10a6:20b:21c:cafe::ba) by AM9P250CA0020.outlook.office365.com (2603:10a6:20b:21c::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.39 via Frontend Transport; Tue, 20 Feb 2024 16:59:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by AM4PEPF00025F98.mail.protection.outlook.com (10.167.16.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7339.0 via Frontend Transport; Tue, 20 Feb 2024 16:59:50 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Tue, 20 Feb 2024 16:59:47 +0000 Received: from vcn-man-apps.manchester.arm.com (10.32.108.22) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.32 via Frontend Transport; Tue, 20 Feb 2024 16:59:47 +0000 From: Joe Ramsay To: CC: Joe Ramsay Subject: [PATCH 4/8] aarch64/fpu: Add vector variants of asinh Date: Tue, 20 Feb 2024 16:59:41 +0000 Message-ID: <20240220165945.21585-4-Joe.Ramsay@arm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20240220165945.21585-1-Joe.Ramsay@arm.com> References: <20240220165945.21585-1-Joe.Ramsay@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM4PEPF00025F98:EE_|GVXPR08MB10809:EE_|AM3PEPF0000A79C:EE_|AS8PR08MB8134:EE_ X-MS-Office365-Filtering-Correlation-Id: fcd00ec9-c985-4d22-2614-08dc32356058 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: V75tBTE9N9CMv10qs3db423rSUgSsnaEA/m0MkJjflP4rGDowtmopmn5Di8b2kxosmdf8b2c/uMzRKXBB6OpfElfeiBTr26nnbOU69GjwOgcpN48nwJwmkREbc1EHs3+YRCYMmkYl9cRWP2DrvBiaD88BaxO56FJqiW8C02nJMXEAdGbgFmO1DONOXYNLfl8zNmkbxWr8dSP6Zup22yaIXaPfx5olO2F4wiCaBRixdIlX7U7wTEYoHfUXJKGiD7f4Z8mLrieRybxaKikAkvQ0S2qAXqQYHx1bw0Keu4DrPqiguE7KGeV8sNvKxP3Hzx1tMb27ab4XFx34/g85XVKR/d0L/maXnptbrzgji/ceSgjSnDlOhFdiFA6Eo/XlmqpZPTYxzwYYvEx55T6OQDx13uBho813kAzqGAbp4vAFFSzeuFTCEnFs7ZMo8YY1htMqnFS3JZM0XjzIwoRMujt0NdYV31fjqAPgEf7O9XUMYVVvxSL09FEHn81+TPuM1gQH547sgIY/XBaI3fCGlOEY3RmSX9p3eB8Kkag1WP1D/04wHPAl8PnceymWmSwLePZYH6ir9MtEmYU/y5iCo8a26xF6KdaMnhprToaq+XV6Fohk7I5JTvpOVsWUOgT9SwQYzTEGzKyHdLaGlUfW/lDXg== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(36860700004)(46966006)(40470700004); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR08MB10809 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM3PEPF0000A79C.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 5fe8c0c9-ccab-4861-26d4-08dc32355a52 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mpyZQchofqXib+hG9MiQnoD8jWkNoj9rW+4FyN6Ie2K7QnIZwVyzp/zkNagvOS/+x8uGtv0hVPhl/0p5tIWUZ2GctZOqvNvyDce0rPq57qTDa9szkz2DZVc6LOrbzr7QMfHhX5LU7/4qYao3xUMa8kwEFOoCQVgR/Up/MjruHX2FYLkbxSoTV+nPD/ZoZQaAOsXX5m3DvhXomQTOjekVNumDGQ33omMbptz27U8pBVl76xDaYMZEDph6Wc7M9nY/cJ2iuIMV3EnThRGBHKsBHHApOVOndifORzHAXQCWlveXTDaeknBE17pM3I80D/UprYNwTA1Mc26G8xCSBOAZ4TlR7GpZGw7sh281DhAlrxkrUeXLcY15Kh4vcVbcLBBvXPzM8TPm8feZOVuyryNhnUgS+qbX8NXQiV5Qn7LlArBrWORJAZ0xComsllQKWsQVLjTOCoDO4NfGzxK1byFPZLVefbTwwwaTXeMmBh5NuDSGKDfszkUgWHxBAJM9qhLrT+MyAYnj55xrjJcFXsYLxDQ540aRPhDPj1cOZAHFeS2znlBa/YQJpemSChl5sZr+me++k6vAc+6bGY+xs43amtLFp7YXxamFXyewp2OsYxbYr4TrQrFa2f1mOm7TQ8iTRGe/773x99ZkHqfOu+dy/A== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230031)(36860700004)(46966006)(40470700004); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Feb 2024 17:00:01.0187 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fcd00ec9-c985-4d22-2614-08dc32356058 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM3PEPF0000A79C.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB8134 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org --- Thanks, Joe sysdeps/aarch64/fpu/Makefile | 1 + sysdeps/aarch64/fpu/Versions | 5 + sysdeps/aarch64/fpu/advsimd_f32_protos.h | 1 + sysdeps/aarch64/fpu/asinh_advsimd.c | 171 ++++++++++++++++++ sysdeps/aarch64/fpu/asinh_sve.c | 150 +++++++++++++++ sysdeps/aarch64/fpu/asinhf_advsimd.c | 80 ++++++++ sysdeps/aarch64/fpu/asinhf_sve.c | 56 ++++++ sysdeps/aarch64/fpu/bits/math-vector.h | 8 + .../fpu/test-double-advsimd-wrappers.c | 1 + .../aarch64/fpu/test-double-sve-wrappers.c | 1 + .../aarch64/fpu/test-float-advsimd-wrappers.c | 1 + sysdeps/aarch64/fpu/test-float-sve-wrappers.c | 1 + sysdeps/aarch64/libm-test-ulps | 8 + .../unix/sysv/linux/aarch64/libmvec.abilist | 5 + 14 files changed, 489 insertions(+) create mode 100644 sysdeps/aarch64/fpu/asinh_advsimd.c create mode 100644 sysdeps/aarch64/fpu/asinh_sve.c create mode 100644 sysdeps/aarch64/fpu/asinhf_advsimd.c create mode 100644 sysdeps/aarch64/fpu/asinhf_sve.c Reviewed-by: Szabolcs Nagy diff --git a/sysdeps/aarch64/fpu/Makefile b/sysdeps/aarch64/fpu/Makefile index 2e5bbb5a07..d474f2969d 100644 --- a/sysdeps/aarch64/fpu/Makefile +++ b/sysdeps/aarch64/fpu/Makefile @@ -1,6 +1,7 @@ libmvec-supported-funcs = acos \ acosh \ asin \ + asinh \ atan \ atan2 \ cos \ diff --git a/sysdeps/aarch64/fpu/Versions b/sysdeps/aarch64/fpu/Versions index 60e1cdeace..08ea15efae 100644 --- a/sysdeps/aarch64/fpu/Versions +++ b/sysdeps/aarch64/fpu/Versions @@ -84,6 +84,11 @@ libmvec { _ZGVnN4v_acoshf; _ZGVsMxv_acosh; _ZGVsMxv_acoshf; + _ZGVnN2v_asinh; + _ZGVnN2v_asinhf; + _ZGVnN4v_asinhf; + _ZGVsMxv_asinh; + _ZGVsMxv_asinhf; _ZGVnN2v_cosh; _ZGVnN2v_coshf; _ZGVnN4v_coshf; diff --git a/sysdeps/aarch64/fpu/advsimd_f32_protos.h b/sysdeps/aarch64/fpu/advsimd_f32_protos.h index 22fec4de77..1e80721c9f 100644 --- a/sysdeps/aarch64/fpu/advsimd_f32_protos.h +++ b/sysdeps/aarch64/fpu/advsimd_f32_protos.h @@ -20,6 +20,7 @@ libmvec_hidden_proto (V_NAME_F1(acos)); libmvec_hidden_proto (V_NAME_F1(acosh)); libmvec_hidden_proto (V_NAME_F1(asin)); +libmvec_hidden_proto (V_NAME_F1(asinh)); libmvec_hidden_proto (V_NAME_F1(atan)); libmvec_hidden_proto (V_NAME_F1(cos)); libmvec_hidden_proto (V_NAME_F1(cosh)); diff --git a/sysdeps/aarch64/fpu/asinh_advsimd.c b/sysdeps/aarch64/fpu/asinh_advsimd.c new file mode 100644 index 0000000000..544a52f651 --- /dev/null +++ b/sysdeps/aarch64/fpu/asinh_advsimd.c @@ -0,0 +1,171 @@ +/* Double-precision vector (Advanced SIMD) asinh function + + Copyright (C) 2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include "v_math.h" +#include "poly_advsimd_f64.h" + +#define A(i) v_f64 (__v_log_data.poly[i]) +#define N (1 << V_LOG_TABLE_BITS) + +const static struct data +{ + float64x2_t poly[18]; + uint64x2_t off, huge_bound, abs_mask; + float64x2_t ln2, tiny_bound; +} data = { + .off = V2 (0x3fe6900900000000), + .ln2 = V2 (0x1.62e42fefa39efp-1), + .huge_bound = V2 (0x5fe0000000000000), + .tiny_bound = V2 (0x1p-26), + .abs_mask = V2 (0x7fffffffffffffff), + /* Even terms of polynomial s.t. asinh(x) is approximated by + asinh(x) ~= x + x^3 * (C0 + C1 * x + C2 * x^2 + C3 * x^3 + ...). + Generated using Remez, f = (asinh(sqrt(x)) - sqrt(x))/x^(3/2). */ + .poly = { V2 (-0x1.55555555554a7p-3), V2 (0x1.3333333326c7p-4), + V2 (-0x1.6db6db68332e6p-5), V2 (0x1.f1c71b26fb40dp-6), + V2 (-0x1.6e8b8b654a621p-6), V2 (0x1.1c4daa9e67871p-6), + V2 (-0x1.c9871d10885afp-7), V2 (0x1.7a16e8d9d2ecfp-7), + V2 (-0x1.3ddca533e9f54p-7), V2 (0x1.0becef748dafcp-7), + V2 (-0x1.b90c7099dd397p-8), V2 (0x1.541f2bb1ffe51p-8), + V2 (-0x1.d217026a669ecp-9), V2 (0x1.0b5c7977aaf7p-9), + V2 (-0x1.e0f37daef9127p-11), V2 (0x1.388b5fe542a6p-12), + V2 (-0x1.021a48685e287p-14), V2 (0x1.93d4ba83d34dap-18) }, +}; + +static float64x2_t NOINLINE VPCS_ATTR +special_case (float64x2_t x, float64x2_t y, uint64x2_t special) +{ + return v_call_f64 (asinh, x, y, special); +} + +struct entry +{ + float64x2_t invc; + float64x2_t logc; +}; + +static inline struct entry +lookup (uint64x2_t i) +{ + float64x2_t e0 = vld1q_f64 ( + &__v_log_data.table[(i[0] >> (52 - V_LOG_TABLE_BITS)) & (N - 1)].invc); + float64x2_t e1 = vld1q_f64 ( + &__v_log_data.table[(i[1] >> (52 - V_LOG_TABLE_BITS)) & (N - 1)].invc); + return (struct entry){ vuzp1q_f64 (e0, e1), vuzp2q_f64 (e0, e1) }; +} + +static inline float64x2_t +log_inline (float64x2_t x, const struct data *d) +{ + /* Double-precision vector log, copied from ordinary vector log with some + cosmetic modification and special-cases removed. */ + uint64x2_t ix = vreinterpretq_u64_f64 (x); + uint64x2_t tmp = vsubq_u64 (ix, d->off); + int64x2_t k = vshrq_n_s64 (vreinterpretq_s64_u64 (tmp), 52); + uint64x2_t iz + = vsubq_u64 (ix, vandq_u64 (tmp, vdupq_n_u64 (0xfffULL << 52))); + float64x2_t z = vreinterpretq_f64_u64 (iz); + struct entry e = lookup (tmp); + float64x2_t r = vfmaq_f64 (v_f64 (-1.0), z, e.invc); + float64x2_t kd = vcvtq_f64_s64 (k); + float64x2_t hi = vfmaq_f64 (vaddq_f64 (e.logc, r), kd, d->ln2); + float64x2_t r2 = vmulq_f64 (r, r); + float64x2_t y = vfmaq_f64 (A (2), A (3), r); + float64x2_t p = vfmaq_f64 (A (0), A (1), r); + y = vfmaq_f64 (y, A (4), r2); + y = vfmaq_f64 (p, y, r2); + y = vfmaq_f64 (hi, y, r2); + return y; +} + +/* Double-precision implementation of vector asinh(x). + asinh is very sensitive around 1, so it is impractical to devise a single + low-cost algorithm which is sufficiently accurate on a wide range of input. + Instead we use two different algorithms: + asinh(x) = sign(x) * log(|x| + sqrt(x^2 + 1) if |x| >= 1 + = sign(x) * (|x| + |x|^3 * P(x^2)) otherwise + where log(x) is an optimized log approximation, and P(x) is a polynomial + shared with the scalar routine. The greatest observed error 3.29 ULP, in + |x| >= 1: + __v_asinh(0x1.2cd9d717e2c9bp+0) got 0x1.ffffcfd0e234fp-1 + want 0x1.ffffcfd0e2352p-1. */ +VPCS_ATTR float64x2_t V_NAME_D1 (asinh) (float64x2_t x) +{ + const struct data *d = ptr_barrier (&data); + + float64x2_t ax = vabsq_f64 (x); + uint64x2_t iax = vreinterpretq_u64_f64 (ax); + + uint64x2_t gt1 = vcgeq_f64 (ax, v_f64 (1)); + uint64x2_t special = vcgeq_u64 (iax, d->huge_bound); + +#if WANT_SIMD_EXCEPT + uint64x2_t tiny = vcltq_f64 (ax, d->tiny_bound); + special = vorrq_u64 (special, tiny); +#endif + + /* Option 1: |x| >= 1. + Compute asinh(x) according by asinh(x) = log(x + sqrt(x^2 + 1)). + If WANT_SIMD_EXCEPT is enabled, sidestep special values, which will + overflow, by setting special lanes to 1. These will be fixed later. */ + float64x2_t option_1 = v_f64 (0); + if (__glibc_likely (v_any_u64 (gt1))) + { +#if WANT_SIMD_EXCEPT + float64x2_t xm = v_zerofy_f64 (ax, special); +#else + float64x2_t xm = ax; +#endif + option_1 = log_inline ( + vaddq_f64 (xm, vsqrtq_f64 (vfmaq_f64 (v_f64 (1), xm, xm))), d); + } + + /* Option 2: |x| < 1. + Compute asinh(x) using a polynomial. + If WANT_SIMD_EXCEPT is enabled, sidestep special lanes, which will + overflow, and tiny lanes, which will underflow, by setting them to 0. They + will be fixed later, either by selecting x or falling back to the scalar + special-case. The largest observed error in this region is 1.47 ULPs: + __v_asinh(0x1.fdfcd00cc1e6ap-1) got 0x1.c1d6bf874019bp-1 + want 0x1.c1d6bf874019cp-1. */ + float64x2_t option_2 = v_f64 (0); + if (__glibc_likely (v_any_u64 (vceqzq_u64 (gt1)))) + { +#if WANT_SIMD_EXCEPT + ax = v_zerofy_f64 (ax, vorrq_u64 (tiny, gt1)); +#endif + float64x2_t x2 = vmulq_f64 (ax, ax), x3 = vmulq_f64 (ax, x2), + z2 = vmulq_f64 (x2, x2), z4 = vmulq_f64 (z2, z2), + z8 = vmulq_f64 (z4, z4), z16 = vmulq_f64 (z8, z8); + float64x2_t p = v_estrin_17_f64 (x2, z2, z4, z8, z16, d->poly); + option_2 = vfmaq_f64 (ax, p, x3); +#if WANT_SIMD_EXCEPT + option_2 = vbslq_f64 (tiny, x, option_2); +#endif + } + + /* Choose the right option for each lane. */ + float64x2_t y = vbslq_f64 (gt1, option_1, option_2); + /* Copy sign. */ + y = vbslq_f64 (d->abs_mask, y, x); + + if (__glibc_unlikely (v_any_u64 (special))) + return special_case (x, y, special); + return y; +} diff --git a/sysdeps/aarch64/fpu/asinh_sve.c b/sysdeps/aarch64/fpu/asinh_sve.c new file mode 100644 index 0000000000..28dc5c4587 --- /dev/null +++ b/sysdeps/aarch64/fpu/asinh_sve.c @@ -0,0 +1,150 @@ +/* Double-precision vector (SVE) asinh function + + Copyright (C) 2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include "sv_math.h" +#include "poly_sve_f64.h" + +#define SignMask (0x8000000000000000) +#define One (0x3ff0000000000000) +#define Thres (0x5fe0000000000000) /* asuint64 (0x1p511). */ + +static const struct data +{ + double poly[18]; + double ln2, p3, p1, p4, p0, p2; + uint64_t n; + uint64_t off; + +} data = { + /* Polynomial generated using Remez on [2^-26, 1]. */ + .poly + = { -0x1.55555555554a7p-3, 0x1.3333333326c7p-4, -0x1.6db6db68332e6p-5, + 0x1.f1c71b26fb40dp-6, -0x1.6e8b8b654a621p-6, 0x1.1c4daa9e67871p-6, + -0x1.c9871d10885afp-7, 0x1.7a16e8d9d2ecfp-7, -0x1.3ddca533e9f54p-7, + 0x1.0becef748dafcp-7, -0x1.b90c7099dd397p-8, 0x1.541f2bb1ffe51p-8, + -0x1.d217026a669ecp-9, 0x1.0b5c7977aaf7p-9, -0x1.e0f37daef9127p-11, + 0x1.388b5fe542a6p-12, -0x1.021a48685e287p-14, 0x1.93d4ba83d34dap-18 }, + .ln2 = 0x1.62e42fefa39efp-1, + .p0 = -0x1.ffffffffffff7p-2, + .p1 = 0x1.55555555170d4p-2, + .p2 = -0x1.0000000399c27p-2, + .p3 = 0x1.999b2e90e94cap-3, + .p4 = -0x1.554e550bd501ep-3, + .n = 1 << V_LOG_TABLE_BITS, + .off = 0x3fe6900900000000 +}; + +static svfloat64_t NOINLINE +special_case (svfloat64_t x, svfloat64_t y, svbool_t special) +{ + return sv_call_f64 (asinh, x, y, special); +} + +static inline svfloat64_t +__sv_log_inline (svfloat64_t x, const struct data *d, const svbool_t pg) +{ + /* Double-precision SVE log, copied from SVE log implementation with some + cosmetic modification and special-cases removed. See that file for details + of the algorithm used. */ + + svuint64_t ix = svreinterpret_u64 (x); + svuint64_t tmp = svsub_x (pg, ix, d->off); + svuint64_t i = svand_x (pg, svlsr_x (pg, tmp, (51 - V_LOG_TABLE_BITS)), + (d->n - 1) << 1); + svint64_t k = svasr_x (pg, svreinterpret_s64 (tmp), 52); + svuint64_t iz = svsub_x (pg, ix, svand_x (pg, tmp, 0xfffULL << 52)); + svfloat64_t z = svreinterpret_f64 (iz); + + svfloat64_t invc = svld1_gather_index (pg, &__v_log_data.table[0].invc, i); + svfloat64_t logc = svld1_gather_index (pg, &__v_log_data.table[0].logc, i); + + svfloat64_t ln2_p3 = svld1rq (svptrue_b64 (), &d->ln2); + svfloat64_t p1_p4 = svld1rq (svptrue_b64 (), &d->p1); + + svfloat64_t r = svmla_x (pg, sv_f64 (-1.0), invc, z); + svfloat64_t kd = svcvt_f64_x (pg, k); + + svfloat64_t hi = svmla_lane (svadd_x (pg, logc, r), kd, ln2_p3, 0); + svfloat64_t r2 = svmul_x (pg, r, r); + + svfloat64_t y = svmla_lane (sv_f64 (d->p2), r, ln2_p3, 1); + + svfloat64_t p = svmla_lane (sv_f64 (d->p0), r, p1_p4, 0); + y = svmla_lane (y, r2, p1_p4, 1); + y = svmla_x (pg, p, r2, y); + y = svmla_x (pg, hi, r2, y); + return y; +} + +/* Double-precision implementation of SVE asinh(x). + asinh is very sensitive around 1, so it is impractical to devise a single + low-cost algorithm which is sufficiently accurate on a wide range of input. + Instead we use two different algorithms: + asinh(x) = sign(x) * log(|x| + sqrt(x^2 + 1) if |x| >= 1 + = sign(x) * (|x| + |x|^3 * P(x^2)) otherwise + where log(x) is an optimized log approximation, and P(x) is a polynomial + shared with the scalar routine. The greatest observed error 2.51 ULP, in + |x| >= 1: + _ZGVsMxv_asinh(0x1.170469d024505p+0) got 0x1.e3181c43b0f36p-1 + want 0x1.e3181c43b0f39p-1. */ +svfloat64_t SV_NAME_D1 (asinh) (svfloat64_t x, const svbool_t pg) +{ + const struct data *d = ptr_barrier (&data); + + svuint64_t ix = svreinterpret_u64 (x); + svuint64_t iax = svbic_x (pg, ix, SignMask); + svuint64_t sign = svand_x (pg, ix, SignMask); + svfloat64_t ax = svreinterpret_f64 (iax); + + svbool_t ge1 = svcmpge (pg, iax, One); + svbool_t special = svcmpge (pg, iax, Thres); + + /* Option 1: |x| >= 1. + Compute asinh(x) according by asinh(x) = log(x + sqrt(x^2 + 1)). */ + svfloat64_t option_1 = sv_f64 (0); + if (__glibc_likely (svptest_any (pg, ge1))) + { + svfloat64_t x2 = svmul_x (pg, ax, ax); + option_1 = __sv_log_inline ( + svadd_x (pg, ax, svsqrt_x (pg, svadd_x (pg, x2, 1))), d, pg); + } + + /* Option 2: |x| < 1. + Compute asinh(x) using a polynomial. + The largest observed error in this region is 1.51 ULPs: + _ZGVsMxv_asinh(0x1.fe12bf8c616a2p-1) got 0x1.c1e649ee2681bp-1 + want 0x1.c1e649ee2681dp-1. */ + svfloat64_t option_2 = sv_f64 (0); + if (__glibc_likely (svptest_any (pg, svnot_z (pg, ge1)))) + { + svfloat64_t x2 = svmul_x (pg, ax, ax); + svfloat64_t x4 = svmul_x (pg, x2, x2); + svfloat64_t p = sv_pw_horner_17_f64_x (pg, x2, x4, d->poly); + option_2 = svmla_x (pg, ax, p, svmul_x (pg, x2, ax)); + } + + /* Choose the right option for each lane. */ + svfloat64_t y = svsel (ge1, option_1, option_2); + + if (__glibc_unlikely (svptest_any (pg, special))) + return special_case ( + x, svreinterpret_f64 (sveor_x (pg, svreinterpret_u64 (y), sign)), + special); + return svreinterpret_f64 (sveor_x (pg, svreinterpret_u64 (y), sign)); +} diff --git a/sysdeps/aarch64/fpu/asinhf_advsimd.c b/sysdeps/aarch64/fpu/asinhf_advsimd.c new file mode 100644 index 0000000000..09fd8a6143 --- /dev/null +++ b/sysdeps/aarch64/fpu/asinhf_advsimd.c @@ -0,0 +1,80 @@ +/* Single-precision vector (Advanced SIMD) asinh function + + Copyright (C) 2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include "v_math.h" +#include "v_log1pf_inline.h" + +#define SignMask v_u32 (0x80000000) + +const static struct data +{ + struct v_log1pf_data log1pf_consts; + uint32x4_t big_bound; +#if WANT_SIMD_EXCEPT + uint32x4_t tiny_bound; +#endif +} data = { + .log1pf_consts = V_LOG1PF_CONSTANTS_TABLE, + .big_bound = V4 (0x5f800000), /* asuint(0x1p64). */ +#if WANT_SIMD_EXCEPT + .tiny_bound = V4 (0x30800000) /* asuint(0x1p-30). */ +#endif +}; + +static float32x4_t NOINLINE VPCS_ATTR +special_case (float32x4_t x, float32x4_t y, uint32x4_t special) +{ + return v_call_f32 (asinhf, x, y, special); +} + +/* Single-precision implementation of vector asinh(x), using vector log1p. + Worst-case error is 2.66 ULP, at roughly +/-0.25: + __v_asinhf(0x1.01b04p-2) got 0x1.fe163ep-3 want 0x1.fe1638p-3. */ +VPCS_ATTR float32x4_t NOINLINE V_NAME_F1 (asinh) (float32x4_t x) +{ + const struct data *dat = ptr_barrier (&data); + uint32x4_t iax = vbicq_u32 (vreinterpretq_u32_f32 (x), SignMask); + float32x4_t ax = vreinterpretq_f32_u32 (iax); + uint32x4_t special = vcgeq_u32 (iax, dat->big_bound); + float32x4_t special_arg = x; + +#if WANT_SIMD_EXCEPT + /* Sidestep tiny and large values to avoid inadvertently triggering + under/overflow. */ + special = vorrq_u32 (special, vcltq_u32 (iax, dat->tiny_bound)); + if (__glibc_unlikely (v_any_u32 (special))) + { + ax = v_zerofy_f32 (ax, special); + x = v_zerofy_f32 (x, special); + } +#endif + + /* asinh(x) = log(x + sqrt(x * x + 1)). + For positive x, asinh(x) = log1p(x + x * x / (1 + sqrt(x * x + 1))). */ + float32x4_t d + = vaddq_f32 (v_f32 (1), vsqrtq_f32 (vfmaq_f32 (v_f32 (1), x, x))); + float32x4_t y = log1pf_inline ( + vaddq_f32 (ax, vdivq_f32 (vmulq_f32 (ax, ax), d)), dat->log1pf_consts); + + if (__glibc_unlikely (v_any_u32 (special))) + return special_case (special_arg, vbslq_f32 (SignMask, x, y), special); + return vbslq_f32 (SignMask, x, y); +} +libmvec_hidden_def (V_NAME_F1 (asinh)) +HALF_WIDTH_ALIAS_F1 (asinh) diff --git a/sysdeps/aarch64/fpu/asinhf_sve.c b/sysdeps/aarch64/fpu/asinhf_sve.c new file mode 100644 index 0000000000..d85c3a685c --- /dev/null +++ b/sysdeps/aarch64/fpu/asinhf_sve.c @@ -0,0 +1,56 @@ +/* Single-precision vector (SVE) asinh function + + Copyright (C) 2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include "sv_math.h" +#include "sv_log1pf_inline.h" + +#define BigBound (0x5f800000) /* asuint(0x1p64). */ + +static svfloat32_t NOINLINE +special_case (svfloat32_t x, svfloat32_t y, svbool_t special) +{ + return sv_call_f32 (asinhf, x, y, special); +} + +/* Single-precision SVE asinh(x) routine. Implements the same algorithm as + vector asinhf and log1p. + + Maximum error is 2.48 ULPs: + SV_NAME_F1 (asinh) (0x1.008864p-3) got 0x1.ffbbbcp-4 + want 0x1.ffbbb8p-4. */ +svfloat32_t SV_NAME_F1 (asinh) (svfloat32_t x, const svbool_t pg) +{ + svfloat32_t ax = svabs_x (pg, x); + svuint32_t iax = svreinterpret_u32 (ax); + svuint32_t sign = sveor_x (pg, svreinterpret_u32 (x), iax); + svbool_t special = svcmpge (pg, iax, BigBound); + + /* asinh(x) = log(x + sqrt(x * x + 1)). + For positive x, asinh(x) = log1p(x + x * x / (1 + sqrt(x * x + 1))). */ + svfloat32_t ax2 = svmul_x (pg, ax, ax); + svfloat32_t d = svadd_x (pg, svsqrt_x (pg, svadd_x (pg, ax2, 1.0f)), 1.0f); + svfloat32_t y + = sv_log1pf_inline (svadd_x (pg, ax, svdiv_x (pg, ax2, d)), pg); + + if (__glibc_unlikely (svptest_any (pg, special))) + return special_case ( + x, svreinterpret_f32 (svorr_x (pg, sign, svreinterpret_u32 (y))), + special); + return svreinterpret_f32 (svorr_x (pg, sign, svreinterpret_u32 (y))); +} diff --git a/sysdeps/aarch64/fpu/bits/math-vector.h b/sysdeps/aarch64/fpu/bits/math-vector.h index 841330956c..eb2af35b27 100644 --- a/sysdeps/aarch64/fpu/bits/math-vector.h +++ b/sysdeps/aarch64/fpu/bits/math-vector.h @@ -41,6 +41,10 @@ # define __DECL_SIMD_asin __DECL_SIMD_aarch64 # undef __DECL_SIMD_asinf # define __DECL_SIMD_asinf __DECL_SIMD_aarch64 +# undef __DECL_SIMD_asinh +# define __DECL_SIMD_asinh __DECL_SIMD_aarch64 +# undef __DECL_SIMD_asinhf +# define __DECL_SIMD_asinhf __DECL_SIMD_aarch64 # undef __DECL_SIMD_atan # define __DECL_SIMD_atan __DECL_SIMD_aarch64 # undef __DECL_SIMD_atanf @@ -131,6 +135,7 @@ __vpcs __f32x4_t _ZGVnN4vv_atan2f (__f32x4_t, __f32x4_t); __vpcs __f32x4_t _ZGVnN4v_acosf (__f32x4_t); __vpcs __f32x4_t _ZGVnN4v_acoshf (__f32x4_t); __vpcs __f32x4_t _ZGVnN4v_asinf (__f32x4_t); +__vpcs __f32x4_t _ZGVnN4v_asinhf (__f32x4_t); __vpcs __f32x4_t _ZGVnN4v_atanf (__f32x4_t); __vpcs __f32x4_t _ZGVnN4v_cosf (__f32x4_t); __vpcs __f32x4_t _ZGVnN4v_coshf (__f32x4_t); @@ -150,6 +155,7 @@ __vpcs __f64x2_t _ZGVnN2vv_atan2 (__f64x2_t, __f64x2_t); __vpcs __f64x2_t _ZGVnN2v_acos (__f64x2_t); __vpcs __f64x2_t _ZGVnN2v_acosh (__f64x2_t); __vpcs __f64x2_t _ZGVnN2v_asin (__f64x2_t); +__vpcs __f64x2_t _ZGVnN2v_asinh (__f64x2_t); __vpcs __f64x2_t _ZGVnN2v_atan (__f64x2_t); __vpcs __f64x2_t _ZGVnN2v_cos (__f64x2_t); __vpcs __f64x2_t _ZGVnN2v_cosh (__f64x2_t); @@ -174,6 +180,7 @@ __sv_f32_t _ZGVsMxvv_atan2f (__sv_f32_t, __sv_f32_t, __sv_bool_t); __sv_f32_t _ZGVsMxv_acosf (__sv_f32_t, __sv_bool_t); __sv_f32_t _ZGVsMxv_acoshf (__sv_f32_t, __sv_bool_t); __sv_f32_t _ZGVsMxv_asinf (__sv_f32_t, __sv_bool_t); +__sv_f32_t _ZGVsMxv_asinhf (__sv_f32_t, __sv_bool_t); __sv_f32_t _ZGVsMxv_atanf (__sv_f32_t, __sv_bool_t); __sv_f32_t _ZGVsMxv_cosf (__sv_f32_t, __sv_bool_t); __sv_f32_t _ZGVsMxv_coshf (__sv_f32_t, __sv_bool_t); @@ -193,6 +200,7 @@ __sv_f64_t _ZGVsMxvv_atan2 (__sv_f64_t, __sv_f64_t, __sv_bool_t); __sv_f64_t _ZGVsMxv_acos (__sv_f64_t, __sv_bool_t); __sv_f64_t _ZGVsMxv_acosh (__sv_f64_t, __sv_bool_t); __sv_f64_t _ZGVsMxv_asin (__sv_f64_t, __sv_bool_t); +__sv_f64_t _ZGVsMxv_asinh (__sv_f64_t, __sv_bool_t); __sv_f64_t _ZGVsMxv_atan (__sv_f64_t, __sv_bool_t); __sv_f64_t _ZGVsMxv_cos (__sv_f64_t, __sv_bool_t); __sv_f64_t _ZGVsMxv_cosh (__sv_f64_t, __sv_bool_t); diff --git a/sysdeps/aarch64/fpu/test-double-advsimd-wrappers.c b/sysdeps/aarch64/fpu/test-double-advsimd-wrappers.c index f4ce1d7009..3d7177c32d 100644 --- a/sysdeps/aarch64/fpu/test-double-advsimd-wrappers.c +++ b/sysdeps/aarch64/fpu/test-double-advsimd-wrappers.c @@ -26,6 +26,7 @@ VPCS_VECTOR_WRAPPER (acos_advsimd, _ZGVnN2v_acos) VPCS_VECTOR_WRAPPER (acosh_advsimd, _ZGVnN2v_acosh) VPCS_VECTOR_WRAPPER (asin_advsimd, _ZGVnN2v_asin) +VPCS_VECTOR_WRAPPER (asinh_advsimd, _ZGVnN2v_asinh) VPCS_VECTOR_WRAPPER (atan_advsimd, _ZGVnN2v_atan) VPCS_VECTOR_WRAPPER_ff (atan2_advsimd, _ZGVnN2vv_atan2) VPCS_VECTOR_WRAPPER (cos_advsimd, _ZGVnN2v_cos) diff --git a/sysdeps/aarch64/fpu/test-double-sve-wrappers.c b/sysdeps/aarch64/fpu/test-double-sve-wrappers.c index 0e973cc9d7..b88a2afe5c 100644 --- a/sysdeps/aarch64/fpu/test-double-sve-wrappers.c +++ b/sysdeps/aarch64/fpu/test-double-sve-wrappers.c @@ -45,6 +45,7 @@ SVE_VECTOR_WRAPPER (acos_sve, _ZGVsMxv_acos) SVE_VECTOR_WRAPPER (acosh_sve, _ZGVsMxv_acosh) SVE_VECTOR_WRAPPER (asin_sve, _ZGVsMxv_asin) +SVE_VECTOR_WRAPPER (asinh_sve, _ZGVsMxv_asinh) SVE_VECTOR_WRAPPER (atan_sve, _ZGVsMxv_atan) SVE_VECTOR_WRAPPER_ff (atan2_sve, _ZGVsMxvv_atan2) SVE_VECTOR_WRAPPER (cos_sve, _ZGVsMxv_cos) diff --git a/sysdeps/aarch64/fpu/test-float-advsimd-wrappers.c b/sysdeps/aarch64/fpu/test-float-advsimd-wrappers.c index 0ce026b5ea..533655402d 100644 --- a/sysdeps/aarch64/fpu/test-float-advsimd-wrappers.c +++ b/sysdeps/aarch64/fpu/test-float-advsimd-wrappers.c @@ -26,6 +26,7 @@ VPCS_VECTOR_WRAPPER (acosf_advsimd, _ZGVnN4v_acosf) VPCS_VECTOR_WRAPPER (acoshf_advsimd, _ZGVnN4v_acoshf) VPCS_VECTOR_WRAPPER (asinf_advsimd, _ZGVnN4v_asinf) +VPCS_VECTOR_WRAPPER (asinhf_advsimd, _ZGVnN4v_asinhf) VPCS_VECTOR_WRAPPER (atanf_advsimd, _ZGVnN4v_atanf) VPCS_VECTOR_WRAPPER_ff (atan2f_advsimd, _ZGVnN4vv_atan2f) VPCS_VECTOR_WRAPPER (cosf_advsimd, _ZGVnN4v_cosf) diff --git a/sysdeps/aarch64/fpu/test-float-sve-wrappers.c b/sysdeps/aarch64/fpu/test-float-sve-wrappers.c index 398b7373e8..f7b673e335 100644 --- a/sysdeps/aarch64/fpu/test-float-sve-wrappers.c +++ b/sysdeps/aarch64/fpu/test-float-sve-wrappers.c @@ -45,6 +45,7 @@ SVE_VECTOR_WRAPPER (acosf_sve, _ZGVsMxv_acosf) SVE_VECTOR_WRAPPER (acoshf_sve, _ZGVsMxv_acoshf) SVE_VECTOR_WRAPPER (asinf_sve, _ZGVsMxv_asinf) +SVE_VECTOR_WRAPPER (asinhf_sve, _ZGVsMxv_asinhf) SVE_VECTOR_WRAPPER (atanf_sve, _ZGVsMxv_atanf) SVE_VECTOR_WRAPPER_ff (atan2f_sve, _ZGVsMxvv_atan2f) SVE_VECTOR_WRAPPER (cosf_sve, _ZGVsMxv_cosf) diff --git a/sysdeps/aarch64/libm-test-ulps b/sysdeps/aarch64/libm-test-ulps index 3afdd35043..dc8cb08b3a 100644 --- a/sysdeps/aarch64/libm-test-ulps +++ b/sysdeps/aarch64/libm-test-ulps @@ -90,11 +90,19 @@ double: 2 float: 2 ldouble: 4 +Function: "asinh_advsimd": +double: 1 +float: 2 + Function: "asinh_downward": double: 3 float: 3 ldouble: 4 +Function: "asinh_sve": +double: 1 +float: 2 + Function: "asinh_towardzero": double: 2 float: 2 diff --git a/sysdeps/unix/sysv/linux/aarch64/libmvec.abilist b/sysdeps/unix/sysv/linux/aarch64/libmvec.abilist index f5aaa519f2..f288afdfdd 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libmvec.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libmvec.abilist @@ -75,15 +75,20 @@ GLIBC_2.39 _ZGVsMxvv_atan2 F GLIBC_2.39 _ZGVsMxvv_atan2f F GLIBC_2.40 _ZGVnN2v_acosh F GLIBC_2.40 _ZGVnN2v_acoshf F +GLIBC_2.40 _ZGVnN2v_asinh F +GLIBC_2.40 _ZGVnN2v_asinhf F GLIBC_2.40 _ZGVnN2v_cosh F GLIBC_2.40 _ZGVnN2v_coshf F GLIBC_2.40 _ZGVnN2v_erf F GLIBC_2.40 _ZGVnN2v_erff F GLIBC_2.40 _ZGVnN4v_acoshf F +GLIBC_2.40 _ZGVnN4v_asinhf F GLIBC_2.40 _ZGVnN4v_coshf F GLIBC_2.40 _ZGVnN4v_erff F GLIBC_2.40 _ZGVsMxv_acosh F GLIBC_2.40 _ZGVsMxv_acoshf F +GLIBC_2.40 _ZGVsMxv_asinh F +GLIBC_2.40 _ZGVsMxv_asinhf F GLIBC_2.40 _ZGVsMxv_cosh F GLIBC_2.40 _ZGVsMxv_coshf F GLIBC_2.40 _ZGVsMxv_erf F