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 CAB92AC14DE for ; Fri, 2 Feb 2024 17:26:59 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=lrT9bHscHpB/FfguNkurdIOSBZ3BFLqu+SUeM4ACgds=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20140610; t=1706894818; v=1; b=A8GkuQs+sFcf07keb+Y0uqo+wIDJw9FlryFa8mPN31I3Q/dn7/QwvJg17HcsGDzmKQujR86H h36dR2d6Rdz7o7+sUaIp3xTdilc6VKsKnSBYDc7UyPzTji1Hw8sMI2MhMqIIql3pEB8pLzW+Hdc zenwQBs5pfJx7C4qta3LqKE8= X-Received: by 127.0.0.2 with SMTP id kbbpYY7687511xP4cgJEqRgy; Fri, 02 Feb 2024 09:26:58 -0800 X-Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by mx.groups.io with SMTP id smtpd.web10.1117.1706894817430851626 for ; Fri, 02 Feb 2024 09:26:57 -0800 X-Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 44373CE2C18 for ; Fri, 2 Feb 2024 17:26:54 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4BB65C433C7 for ; Fri, 2 Feb 2024 17:26:53 +0000 (UTC) X-Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-51121637524so3461895e87.1 for ; Fri, 02 Feb 2024 09:26:53 -0800 (PST) X-Gm-Message-State: f2y4nxGHr781aykdVXxfCD2ox7686176AA= X-Google-Smtp-Source: AGHT+IEoHJ2slCJ7atVEgcTakic9RiCI+RiyPz6nY++ppy3xBXaiNgzyRA21PNeP+pEicB3tfJJb/V3+SpCGGJrQxWk= X-Received: by 2002:a05:6512:3c90:b0:511:e7f:3ae8 with SMTP id h16-20020a0565123c9000b005110e7f3ae8mr5578747lfv.48.1706894811486; Fri, 02 Feb 2024 09:26:51 -0800 (PST) MIME-Version: 1.0 References: <94947568d9796a588337b287055f7fb84f359d97.1706753064.git.jbrasen@nvidia.com> In-Reply-To: <94947568d9796a588337b287055f7fb84f359d97.1706753064.git.jbrasen@nvidia.com> From: "Ard Biesheuvel" Date: Fri, 2 Feb 2024 18:26:40 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH 1/1] ArmPkg/CompilerIntrinsicsLib: provide __ashlti3 To: Jeff Brasen Cc: devel@edk2.groups.io, ardb+tianocore@kernel.org, quic_llindhol@quicinc.com, sami.mujawar@arm.com 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,ardb@kernel.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=A8GkuQs+; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On Thu, 1 Feb 2024 at 03:05, Jeff Brasen wrote: > > The compiler will use this function if it is left shifting a 128 bit > value. > > Signed-off-by: Jeff Brasen UEFI does not define any 128 bit types, right? How do you end up needing this? > --- > .../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] > > [Sources.AARCH64] > AArch64/Atomics.S | GCC > + AArch64/ashlti3.S | GCC > > [Packages] > MdePkg/MdePkg.dec > diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/AArch64/ashlti3.S b/ArmPkg/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 <= 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 > -- > 2.34.1 > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115063): https://edk2.groups.io/g/devel/message/115063 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] -=-=-=-=-=-=-=-=-=-=-=-