From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id C29BFD802C8 for ; Thu, 1 Feb 2024 02:05:55 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=BTPIt57TPxK5Pesk85V7NpD78hbYuqIGt4fbKFFKw9Y=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:From:To:CC:Subject:Date:Message-ID:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1706753154; v=1; b=mLquRAAoBhABk9j1Umcnv2RAfy/Y3s+YfqurCwrLMWko19NczqPnrA65aC61T9oihmV9H4ty liTKoqMoyBi0b/QM3SyPQq37cI+5uEoYPJzPns1HFh4GXhD2+ooVMLWWKOwCHYAVfC0jlYvKE8z FeVThFJJ2uNXld0zltEpJQcA= X-Received: by 127.0.0.2 with SMTP id vzw9YY7687511xk47Upuq4HT; Wed, 31 Jan 2024 18:05:54 -0800 X-Received: from NAM10-BN7-obe.outbound.protection.outlook.com (NAM10-BN7-obe.outbound.protection.outlook.com [40.107.92.82]) by mx.groups.io with SMTP id smtpd.web11.6117.1706753153546781529 for ; Wed, 31 Jan 2024 18:05:53 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mbf9tApzQgiRU7oV9wrO7dRJl1/NCHiXMuIrOSO9IcPF3Rwl65hZzRGRaw+znFJEhMXpSktkArKOmsiVLkuD3P6MId3iBMa2ZSiX1jJgqAFTWwx1PYKlvDYWgNHCyCVna3S38V7SS4vSwQakm3CI0fKRwwK5mPL9Uw8JOceuM3DPhmKKgRg2KfGwed34PWmzAbNnix/Slq0RgETIzva95SV7yeoel+zWVbW7+BEVRkfy18NjR/9153snQB0l/mrnsN0VXRwpXT+p5P6kGFlxFy/SjsyBkAZa8NMeXbvhgqscHV808PESN3NngKIbkkDpzQWuQ/Q81GE2JeprE8Zx9g== 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=KPvkyF/9yz+w2JiypFcy5UIpTX4LalbB0xtGZTqr5no=; b=aaS8+rA5K0mz4WEUKMSMPAXCiAwgZxo+X3EB3nBMUtJSCNL9u/AQF8H1Hzk45Niv6Hn7N3l95Ivm40GKO7uF0XwNjIPpKP9oR4EWB/xs1Rql3AEEXt2MdG5ftUO2/nhTY8H1Y+JYzXZUzCLaIFJdWNTFwTdjUOZl0mSP4r7xCn29tsHFlzbNCHJZyWCIqA+9cwLfBcq1SOOXZ0X+HiT/a/q4QwWn65lb1igsA6eSHzSVma4KTOIJyN80a5YSodhwLXPkEAmz0rzITF5waSBi3FLs9C5b3U0o3sEGT668SlK02eJRIiocqmxEsoUd8d6jsf19dZF3A96o7AO478cUig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) X-Received: from MN2PR06CA0008.namprd06.prod.outlook.com (2603:10b6:208:23d::13) by BY5PR12MB4097.namprd12.prod.outlook.com (2603:10b6:a03:213::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.35; Thu, 1 Feb 2024 02:05:49 +0000 X-Received: from BL6PEPF0001AB59.namprd02.prod.outlook.com (2603:10b6:208:23d:cafe::ba) by MN2PR06CA0008.outlook.office365.com (2603:10b6:208:23d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.34 via Frontend Transport; Thu, 1 Feb 2024 02:05:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C X-Received: from mail.nvidia.com (216.228.118.233) by BL6PEPF0001AB59.mail.protection.outlook.com (10.167.241.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.19 via Frontend Transport; Thu, 1 Feb 2024 02:05:49 +0000 X-Received: from drhqmail202.nvidia.com (10.126.190.181) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 31 Jan 2024 18:05:31 -0800 X-Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Wed, 31 Jan 2024 18:05:30 -0800 X-Received: from 8431e46b0b84.nvidia.com (10.127.8.13) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.1258.12 via Frontend Transport; Wed, 31 Jan 2024 18:05:30 -0800 From: "Jeff Brasen via groups.io" To: CC: , , , Jeff Brasen Subject: [edk2-devel] [PATCH 1/1] ArmPkg/CompilerIntrinsicsLib: provide __ashlti3 Date: Wed, 31 Jan 2024 18:05:28 -0800 Message-ID: <94947568d9796a588337b287055f7fb84f359d97.1706753064.git.jbrasen@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB59:EE_|BY5PR12MB4097:EE_ X-MS-Office365-Filtering-Correlation-Id: b50bb3da-8d71-4af3-6614-08dc22ca4f80 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: v1DJYtsM9+NHL+6nrX2VouKlWtC8iPwJnr+aWpKyRF6uphnTpnbM1KEpIZX/Dc2X7Jb1TlkZFihYWI12B+ZklkUVY/hm7qcG5OokLxHm0c7uHt1xM+9/BxHU7SnY8mUGE1lJx8h5wBaslmrdTvljI1t8seGNqqdT4h+VyNLnLhaZe5bp3F+IKNmZUPzbMAMkhEOtPEl/uumtzTOuO263fielElufbDeL6i9onUjygBiIMzTyR+/qY2BJjsWf2gzYJ6mUj/ASAjFFsj6GpcF3HEWYd0xyZTfxL+sCPaLa80uTzIPi+7LvxH69aEhaapbt5D/2WLI+D3ADMJ1/7LHkVQayrGLzgGXNPIYBb2RtgbAtS/zVxIAxHyqBU9BESp7yAxBMaiZvND/5tRbisB0G5RuZqEFq6Q7t7pR59auTSSPtbetXRJTlo2fyFjkPw7/JxiafxKTa+6YZApprOoc91MrvkdURQ4kSS4aRu9o0+VXqY9BCUHfLF2kdByZ8mi8Unsn0aaStGLL4CEoe+MjnPr4h0CAAaJb7ZPgLnVHayFQiaQbU1FOpo2U2DsWwMqAwRX/gAOj/WvsoFFxlO1XjwGa8/d/jLa7ND5D7Z8sMXbFfhgtuq9W2IdsbqUxPIdsVx7cDayzHtE8nC5757d93ew+d1yGVSmaHM4Gu9mtobaIcvDYNhAPMN/v6NoWEdA99V23/c6l3ukU1yZHko58np+bWHeks9aCq/gaiUpv/kCQL8pf2hU5YXfZnYqtEwfrP X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2024 02:05:49.0445 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b50bb3da-8d71-4af3-6614-08dc22ca4f80 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.233];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF0001AB59.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4097 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,jbrasen@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: teNmHK8byLb2jq7mvnRRzMLNx7686176AA= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=mLquRAAo; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=none; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") The compiler will use this function if it is left shifting a 128 bit value. Signed-off-by: Jeff Brasen --- .../CompilerIntrinsicsLib.inf | 1 + .../CompilerIntrinsicsLib/AArch64/ashlti3.S | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 ArmPkg/Library/CompilerIntrinsicsLib/AArch64/ashlti3.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf= b/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf index 7e22e6f67bff..054e68130730 100644 --- a/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf +++ b/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf @@ -66,6 +66,7 @@ [Sources.ARM] =20 [Sources.AARCH64] AArch64/Atomics.S | GCC + AArch64/ashlti3.S | GCC =20 [Packages] MdePkg/MdePkg.dec diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/AArch64/ashlti3.S b/ArmPk= g/Library/CompilerIntrinsicsLib/AArch64/ashlti3.S new file mode 100644 index 000000000000..79a7b3514c57 --- /dev/null +++ b/ArmPkg/Library/CompilerIntrinsicsLib/AArch64/ashlti3.S @@ -0,0 +1,33 @@ +#-------------------------------------------------------------------------= ----- +# +# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +#-------------------------------------------------------------------------= ----- + +#include + +ASM_FUNC(__ashlti3) + # return if shift is 0 + cbz x2, 1f + + mov x3, #64 + sub x3, x3, x2 + cmp x3, #0 + b.le 2f + + # shift is <=3D 64 bits + lsr x3, x0, x3 + lsl x1, x1, x2 + orr x1, x1, x3 + lsl x0, x0, x2 +1: + ret + +2: + # shift is > 64 + neg w3, w3 + lsl x1, x0, x3 + mov x0, #0 + ret --=20 2.34.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114926): https://edk2.groups.io/g/devel/message/114926 Mute This Topic: https://groups.io/mt/104088827/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-