From patchwork Thu Jun 3 14:51:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 1487282 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=XNPhalQR; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Fwplb6SLBz9s24 for ; Fri, 4 Jun 2021 00:52:27 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 50FFE398BC20 for ; Thu, 3 Jun 2021 14:52:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 50FFE398BC20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1622731945; bh=Q7X/rObpzUsJkBn0zPNtLkaHfOp71THIfiVdKGXHvYE=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=XNPhalQRzv5YmnbmLIgJpGfVQtSxjE3jeQq95jEhRtmo+2TspIitaBAPJN5moDqqG bY5nUDQP9lthgMkaGXdhgCxkxQsf+vbVJbJIn2k0OVp7dTSqe9B02OhfsQ/dWTGa6x +yWFolTSzIUbHNp8Yf4UhsHnbqRGVCzwRZyhMK/w= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70041.outbound.protection.outlook.com [40.107.7.41]) by sourceware.org (Postfix) with ESMTPS id D4315386FC28 for ; Thu, 3 Jun 2021 14:52:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D4315386FC28 Received: from PR0P264CA0110.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:19::26) by PAXPR08MB6847.eurprd08.prod.outlook.com (2603:10a6:102:13d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.21; Thu, 3 Jun 2021 14:52:06 +0000 Received: from VE1EUR03FT045.eop-EUR03.prod.protection.outlook.com (2603:10a6:100:19:cafe::55) by PR0P264CA0110.outlook.office365.com (2603:10a6:100:19::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.15 via Frontend Transport; Thu, 3 Jun 2021 14:52:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; sourceware.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;sourceware.org; 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; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT045.mail.protection.outlook.com (10.152.19.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.21 via Frontend Transport; Thu, 3 Jun 2021 14:52:06 +0000 Received: ("Tessian outbound bf434e582664:v93"); Thu, 03 Jun 2021 14:52:06 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 887c8b94b2334b8c X-CR-MTA-TID: 64aa7808 Received: from d1ec235bc262.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 5CDABA76-0B5A-465C-BF2E-B09AF2A32875.1; Thu, 03 Jun 2021 14:51:39 +0000 Received: from EUR03-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d1ec235bc262.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 03 Jun 2021 14:51:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i1VbxO9XYMAWXj4BazSslNUo17zjqHZtwK8phy7gyCGOwMIV37K++n9HowScKsivFh7yLc9/rkceX6K6buksl7uzhxdENuwdcOHZAfOvsnt4oVH+7YdLrV52L5UjI1e7krTV2N1jiPUwoTkSO2av67Fh7hS0QjTB5Wz7ss8nmRIoS1p4+tVoNohIww5HdHF4WnGjPEidFIz4Q9O2CeA1ebxZmNeR1ABEFwJvfbuQIfPylAZkxkaO4eztVmXdx+nLmV9jJo8JYBimbRFAEqlxTd6KFuvX1MNsMubNERQLE4Sb5PoE1BBIToFY3LojglibNDdNp8PW54FmJQTFQpENiw== 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-SenderADCheck; bh=Q7X/rObpzUsJkBn0zPNtLkaHfOp71THIfiVdKGXHvYE=; b=TAc6sp9W1sCGiwTlT7KFPHqUQICootelep3ErS2SvOoyewcUF/yN+g+HkQ+P+ge8IZb3aVm64Kmz6l8MKGje9lFJmAQK2r9zWiLWWy78vZ6mWLat/m2wZTqCUJla3CHWIk+XMKjKL73Rno0o5nL61mjxCmIVNmxZt8veCt7E+rMAbQi7GzTH28GZ3DIboJWd/0c5bYxB8FSTC/BIGCc2qlK7XFx3Fs2hTwHh7Vn+PPHASn4bFvrcgkdQ+CmI2rwKYskprBERthmyXajSMb7zH0yNcmtLbUbT+62qQokHMYYlngEG5+ItZj5OD/kFAfRDahvHsMsjtl+XrAFRtmjahg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none Received: from VE1PR08MB5599.eurprd08.prod.outlook.com (2603:10a6:800:1a1::12) by VE1PR08MB5807.eurprd08.prod.outlook.com (2603:10a6:800:1b2::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.23; Thu, 3 Jun 2021 14:51:31 +0000 Received: from VE1PR08MB5599.eurprd08.prod.outlook.com ([fe80::4c5d:2992:e647:a71]) by VE1PR08MB5599.eurprd08.prod.outlook.com ([fe80::4c5d:2992:e647:a71%4]) with mapi id 15.20.4195.022; Thu, 3 Jun 2021 14:51:31 +0000 To: 'GNU C Library' Subject: [PATCH] AArch64: Add support for roundeven[f] Thread-Topic: [PATCH] AArch64: Add support for roundeven[f] Thread-Index: AQHXWIeyFULbemBAPUGv4sBMo/yArw== Date: Thu, 3 Jun 2021 14:51:31 +0000 Message-ID: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: Authentication-Results-Original: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=arm.com; x-originating-ip: [82.24.249.100] x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: 7ca6dcdd-357d-4d60-f395-08d9269f2846 x-ms-traffictypediagnostic: VE1PR08MB5807:|PAXPR08MB6847: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:949;OLM:949; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: f/04HCjb1600HzT8bhSyAnYl8ANDkIXpye+3zkfVmlNZGaOwEdYlt+oDUZVEA5oIHziXlMJI8ZTuQJS6OBQ6mxnilnnmwKsw3TciDKIBlLCFBkEDbCbHMwaW7Ey9NAKFoVGnpzYGMr2iUN8g4raedQxB4ljmvGt03hzEJEy4QcS6y5O1rkFbZ9ZLJDCmNivqIPxrflEhpuz3t3qM+37m7J7DrL4RUFV9s1QlhmQuzx7ohGZ+PUFtWTh2oPkShhOgWmb023cFVU6X97xQUa4yidfG4yRvJ9ds+NYPv7+iTzXXJUk14V+/OwWMoCPEaxcBaI0YB950n4xaJPP2BFvDFOdlebbx609aK2msdfqJueAvKiJEiLcxv9aDdgU6xgLadKswDiwLseNXyi4RDsSyiZUWpz/mujqHqI2LpYWwbPlaRe99vno1CA/ZaudO4Uxtk0As2LhWEisw3YDR27Y7TGAGQIGkD7QCdp5hwcaujaaw7YjA2/DN+NJJmVcaojjFmJPy5bfwOS0VWs7dupRAiLqUyQP/UeQTmyuahhNhrRceCOMqNzheoYtpTV8oP8JRLHOMT0xxHkQ6oSb8wwoG23CLrvPxzZmsTNh/POiImDb1uy4VU7UQ7wkbbDYLfXZdtc8hNCVDge/N1pM7DwxMQrWxGdKCev8Jlv806/1t8Mr4gm3NO5tsD8LP15P7wvBzvMPm167x/oizZ5cIJ+WGLnoif3I/Tb4xuM6wikXdrzu/kHu0i3s/S/HrOw0SpNl6sF/TsWWQE6y1oj4lskK7YA== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR08MB5599.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(136003)(366004)(39850400004)(346002)(396003)(6506007)(76116006)(6916009)(7696005)(478600001)(52536014)(2906002)(71200400001)(122000001)(38100700002)(5660300002)(33656002)(64756008)(9686003)(186003)(26005)(316002)(66476007)(66946007)(66556008)(55016002)(66446008)(8676002)(86362001)(8936002)(2004002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?iso-8859-1?q?w2C3fF9dl4AXp9UFIoUl83F9T?= =?iso-8859-1?q?P8VnwcZxafIpqPJnSLR5IilDbwbPwmYOueIjbkeaUEAVL+MTp3nYrXCSRSWz?= =?iso-8859-1?q?Vy4iEAnJJ8Kw/NZaUhp/bFVre/39NRnELSN+o4sOfEReXdpgDkBUvJq2EcnO?= =?iso-8859-1?q?5tuoj7X6N8A7m5ozK7kqlUUjbdG+PeTAV2+04Ijjg333d+VjfFif7F915TT7?= =?iso-8859-1?q?nIC6KiToGiTCKqEMrerVsoHQlaua6tfCSMYoED/xxUopikHxVJY5yfx2zt/o?= =?iso-8859-1?q?X357qWQ/7uVxGLZW1cpx9TcngfwliWk2aoJK0ncPDZb1eXk39ovzIOfmOAxt?= =?iso-8859-1?q?Wymj4i8/V9bd4H8AGUSzpJha+idSfceyDlfRoCjAiAgvLxEPG98QAJMBSqh+?= =?iso-8859-1?q?LNUkY4GSthdepPhHxyGDDs/RejE1BFecVteOlly0kmSLmBdCG0sdX9ZuP0ND?= =?iso-8859-1?q?O2i4aQadc1Ov+dkooT899KWhAbA66azsMt+B+Z1uTGCAw/+wBs+0fFUcY8Mm?= =?iso-8859-1?q?4gpySg5uFY9jndQdddy/LqML1M7s5YEu9cfuwz81aphktn2CDyTdMr1k17Wc?= =?iso-8859-1?q?ejyUww7GYseuLhT1BM19vvJJaN5jQDlb7Hg7MD/DLgcFQnH5WS1OaFBMeZ2f?= =?iso-8859-1?q?v14A7WJwYUk14kqSeN6gY1PFaPrPpCBAsb4wPGrrp9NjXCWytpSsAYHr4Bk5?= =?iso-8859-1?q?b7qxPuPaHMKFmMC+3pyf5p5kFZ8iUYGUAso5plRr7mZjggUlyF/zpN9isBK+?= =?iso-8859-1?q?7KkglyAP1n2bycpVbhwfJixxMD4dH2WYhqh14zTL1sYJXBloD3LraL8peEcX?= =?iso-8859-1?q?9XRONxbvn56AXt2lHEMZWg3JzFhs+/WNDwtYXNLVCliPy8N6F7EiP2vEOlpY?= =?iso-8859-1?q?XK40wbZ271d/M4aqggv4iSMKBD6VrCY1PYTU8jHRu0kF/xAy9eenxKiCMy6C?= =?iso-8859-1?q?X1BGCMkAngcGwOvu6KsfKQX31Yv1xl6NYZ9pcJys8YcNH4Qebknrlk9Eoq97?= =?iso-8859-1?q?NHZbDDKxL2GmwLwGDzEcZtSMJq0Qbo4dZvI7Mc4oyqriZFwN423mMNFwVO78?= =?iso-8859-1?q?X/4WkMkY9QOx3JCTDCU8gPMM4CXNg8aQXAuSUr1W72e5SbnSm+2l2hCjHrTN?= =?iso-8859-1?q?b2pAh391764MoAbO22vaGx9acm6R646stPS9+4OGabdkLw27YaHP5DGUSZeD?= =?iso-8859-1?q?RRyElrXeMQx3iEqHwm39S/etfeFcOZJqmhA5bGDbMzs413eOR80A2P5YbllR?= =?iso-8859-1?q?fEhYncl4CEi0UifXbE8YMKo5MY80wtjzt9jQ1upRpmU44AXJXmUB/2pft/u4?= =?iso-8859-1?q?q+GerAtfbIojDuS5u1PBmjmr5KU2rtDM4R82oY=3D?= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5807 Original-Authentication-Results: sourceware.org; dkim=none (message not signed) header.d=none; sourceware.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT045.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 970c812f-49c0-4787-64ee-08d9269f1381 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CoKTDe7oOv7WMTs2oyz+HeA0PjcSl/5BNLUERLWuSK/eKKprOlD+R1i+zZgFFO2cQ6xjL9xx023LDENcIX9jJK+hK4zy2SNDVJiYZVZN66jR8ibeekAOwQcTWWdOaeF6vwsiFw68vImBPsPlPRLuPCWEn/Cb2xnG4qZ0+CRKRNBF5GTEEUv2peC8J/TAo0LRMSmKC5AWRZmrT6m/dP6t26/6g3WcpLRGpZq9KkLkpOt+UAGZzUURai2dMnToNd2py9LkZPlW4HL4IZu30m4CC4noxAcbfQUOmDkagXK8LHckL1P3C1MpIxpOWFIpsrNAKRNvOVlu73hUL51owNHnD1PH4vnzZ+HeMsKeTWvzuvOJBJOVZEAKr4E2ArNAFiMvVa68XL+RyxLY7K7HIbhLRKyCZRdBOAHfRW97/jOnvm3tX0ykDzY1wSuoE7fXR8Eb8eP5PXpxFFgezDIr6QBH2YvEhPj7sA7pGVwhc8a5Y5aIDtVmJ2gCAqa+KBodom1I6evju9Inwtt5fMgYKOoH8MWvP52JyMiB6o6bbRYjZI0h5L5WD4pvFet/wRGuxo0gQ1Uno7cJIWFtqgBedW4mWLraIB0OECVyAfz67hjV0GuryFGdhT8REqnm622nB8Rs5OwzYWv2Z8z5b/S1DsFqf81RARFW/CL4+J2CDRfEvV34PUqKWy8wc9NcanDKMKoE2WUXBZ3HEOleztPoekkr04TZYo1B1+49HJoEp7/pg2l9yBOI0Ib42ioqn6wFyb9FMYM3sWIvlXZ2MlpsAGZKGhFfKIAYuUPFsaQ/9fxDDZo= 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:(4636009)(39850400004)(136003)(346002)(376002)(396003)(36840700001)(46966006)(186003)(36860700001)(26005)(336012)(2906002)(6506007)(478600001)(47076005)(70206006)(70586007)(316002)(82310400003)(82740400003)(9686003)(7696005)(81166007)(52536014)(5660300002)(356005)(8936002)(8676002)(33656002)(6916009)(55016002)(86362001)(2004002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jun 2021 14:52:06.5270 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7ca6dcdd-357d-4d60-f395-08d9269f2846 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: VE1EUR03FT045.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6847 X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Wilco Dijkstra via Libc-alpha From: Wilco Dijkstra Reply-To: Wilco Dijkstra Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" Add inline assembler versions of the roundeven functions. Passes GLIBC regress. OK for commit? diff --git a/sysdeps/aarch64/fpu/s_roundeven.c b/sysdeps/aarch64/fpu/s_roundeven.c new file mode 100644 index 0000000000000000000000000000000000000000..d74b40daf5d02257f059c73eb4929e5c3824595c --- /dev/null +++ b/sysdeps/aarch64/fpu/s_roundeven.c @@ -0,0 +1,29 @@ +/* Copyright (C) 2021 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 +#include + +double +__roundeven (double x) +{ + asm volatile ("frintn \t%d0, %d1" : "=w" (x) : "w" (x)); + return x; +} +hidden_def (__roundeven) +libm_alias_double (__roundeven, roundeven) diff --git a/sysdeps/aarch64/fpu/s_roundevenf.c b/sysdeps/aarch64/fpu/s_roundevenf.c new file mode 100644 index 0000000000000000000000000000000000000000..dfc492c2f8855d491896ace1669a69a4cab98492 --- /dev/null +++ b/sysdeps/aarch64/fpu/s_roundevenf.c @@ -0,0 +1,28 @@ +/* Copyright (C) 2021 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 +#include + +float +__roundevenf (float x) +{ + asm volatile ("frintn \t%s0, %s1" : "=w" (x) : "w" (x)); + return x; +} +libm_alias_float (__roundeven, roundeven)