From nobody Thu May 16 16:08:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+90180+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90180+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654259210; cv=none; d=zohomail.com; s=zohoarc; b=JjVbDX5K2hxKho/PXNUWX/W1Ujiq6pDAzAJ5gZoQvWya4fMgFoiOyhnPsCxyng2FCD9MWW3bbq0eEtO1bpK81H4E2Bj9CyvCXkNhHKcNsY3opLkU0xVzUHCVeL8aq/Q9wjKxGYa4oRr4t6lXScUl2kEep9NTmvqg61euCe2lmwg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654259210; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=oNHbFAD9raMZNGJ3fFVa+rtt5OVvjXrUrisdgwYWz/A=; b=SIep6UrI1/TbfX6WaIzmix3TJjIXBblLV+fjQRFzv3PPI8hOgEZf6RAXqnGmOwIYMwgs5D/9XNmncDvbOuR5QIPA1gSYyJC6e4ucTIwB8UKN8KeXQQRUFKC3DtE6GcD0da0lH+okqkKJ/I8CzkZEBUKk0qhhteRiHVadN8PaSNw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90180+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 16542592105674.572317673740713; Fri, 3 Jun 2022 05:26:50 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id eMVdYY1788612xweyh9l1JGF; Fri, 03 Jun 2022 05:26:50 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web12.6653.1654259208656559686 for ; Fri, 03 Jun 2022 05:26:49 -0700 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-562-08iBlYf7PdGgPqy-9PfSnw-1; Fri, 03 Jun 2022 08:26:44 -0400 X-MC-Unique: 08iBlYf7PdGgPqy-9PfSnw-1 X-Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C5F53802804; Fri, 3 Jun 2022 12:26:42 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 718D0C23DC9; Fri, 3 Jun 2022 12:26:40 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id EE9E518009CF; Fri, 3 Jun 2022 14:26:38 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Jian J Wang , Jiaxin Wu , Sean Brogan , Anthony Perard , Leif Lindholm , Zhiguang Liu , Xiaoyu Lu , Pawel Polawski , Sami Mujawar , Maciej Rabeda , Bob Feng , Jiewen Yao , Andrew Fish , Bret Barkelew , Alexei Fedorov , Guo Dong , Gerd Hoffmann , kilian_kegel@hotmail.com, Maurice Ma , Siyuan Fu , Abner Chang , Zhichao Gao , Wei6 Xu , Supreeth Venkatesh , Julien Grall , Daniel Schaefer , Ard Biesheuvel , Guomin Jiang , Jordan Justen , Oliver Steffen , Sebastien Boeuf , Benjamin You , Min Xu , Ray Ni , Rebecca Cran , Nickle Wang , Michael D Kinney , Tom Lendacky , Sami Mujawar , Peter Grehan , Erdem Aktas , Brijesh Singh , James Bottomley , Yuwei Chen , Liming Gao , Jiewen Yao , Ard Biesheuvel Subject: [edk2-devel] [PATCH v4 1/9] MdePkg: promote CompilerIntrinsicsLib from ArmPkg to MdePkg Date: Fri, 3 Jun 2022 14:26:30 +0200 Message-Id: <20220603122638.1547060-2-kraxel@redhat.com> In-Reply-To: <20220603122638.1547060-1-kraxel@redhat.com> References: <20220603122638.1547060-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: 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,kraxel@redhat.com X-Gm-Message-State: n0ZwgQmZygMYGERtyWui4cT2x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1654259210; bh=0vvJ4nZYc7vZynxcza6hbExJLeNZK6ZQvumDgEdbPQI=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=NSmrZA0dJD4jej4tF+nmpmIVaGGk4TlKAMDVrryTBmT9/g3IOPhT8mTeW80542N3Vf2 86dBTkfx7FQG/iPe8nwg31ZWOAx4IbXV7/9x/SuFIMkcMwHPlVtQ8tDLSGaX/Um4ou7Sd lpFX9k8+Gp6fBwLFjMxpcanDXMQgfFNudAc= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1654259212759100011 Content-Type: text/plain; charset="utf-8"; x-default="true" First step in creating a single, common compiler intrinsics library for everybody who needs it. Move the ArmPkg library to MdePkg, update all references. No code changes. Signed-off-by: Gerd Hoffmann Acked-by: Jiewen Yao Acked-by: Ard Biesheuvel Acked-by: Liming Gao --- ArmVirtPkg/ArmVirt.dsc.inc | 2 +- .../UnitTestFrameworkPkgTarget.dsc.inc | 2 +- ArmPkg/ArmPkg.dsc | 3 +-- .../ArmCrashDumpDxe/ArmCrashDumpDxe.dsc | 2 +- ArmPlatformPkg/ArmPlatformPkg.dsc | 2 +- CryptoPkg/CryptoPkg.dsc | 2 +- DynamicTablesPkg/DynamicTablesPkg.dsc | 2 +- EmbeddedPkg/EmbeddedPkg.dsc | 2 +- FatPkg/FatPkg.dsc | 2 +- FmpDevicePkg/FmpDevicePkg.dsc | 2 +- MdeModulePkg/MdeModulePkg.dsc | 2 +- MdePkg/MdePkg.dsc | 1 + NetworkPkg/NetworkPkg.dsc | 2 +- RedfishPkg/RedfishPkg.dsc | 2 +- SecurityPkg/SecurityPkg.dsc | 2 +- ShellPkg/ShellPkg.dsc | 2 +- SignedCapsulePkg/SignedCapsulePkg.dsc | 2 +- StandaloneMmPkg/StandaloneMmPkg.dsc | 2 +- .../CompilerIntrinsicsLib.inf | 1 - {ArmPkg =3D> MdePkg}/Include/AsmMacroIoLib.h | 0 .../Library/CompilerIntrinsicsLib/memcmp_ms.c | 0 .../Library/CompilerIntrinsicsLib/memcpy.c | 0 .../Library/CompilerIntrinsicsLib/memcpy_ms.c | 0 .../CompilerIntrinsicsLib/memmove_ms.c | 0 .../Library/CompilerIntrinsicsLib/memset.c | 0 .../Library/CompilerIntrinsicsLib/memset_ms.c | 0 ArmPkg/ArmPkg.ci.yaml | 1 - .../DEBUG_XCODE31/CompilerIntrinsicsLib.lib | Bin 36072 -> 36072 bytes .../DEBUG_XCODE32/CompilerIntrinsicsLib.lib | Bin 36072 -> 36072 bytes .../CompilerIntrinsicsLib/AArch64/Atomics.S | 0 .../CompilerIntrinsicsLib/Arm/ashldi3.S | 0 .../CompilerIntrinsicsLib/Arm/ashrdi3.S | 0 .../CompilerIntrinsicsLib/Arm/clzsi2.S | 0 .../CompilerIntrinsicsLib/Arm/ctzsi2.S | 0 .../Library/CompilerIntrinsicsLib/Arm/div.S | 0 .../Library/CompilerIntrinsicsLib/Arm/div.asm | 0 .../CompilerIntrinsicsLib/Arm/divdi3.S | 0 .../CompilerIntrinsicsLib/Arm/divsi3.S | 0 .../Library/CompilerIntrinsicsLib/Arm/lasr.S | 0 .../CompilerIntrinsicsLib/Arm/ldivmod.S | 0 .../CompilerIntrinsicsLib/Arm/ldivmod.asm | 0 .../Library/CompilerIntrinsicsLib/Arm/llsl.S | 0 .../Library/CompilerIntrinsicsLib/Arm/llsr.S | 0 .../CompilerIntrinsicsLib/Arm/llsr.asm | 0 .../CompilerIntrinsicsLib/Arm/lshrdi3.S | 0 .../CompilerIntrinsicsLib/Arm/memmove.S | 0 .../CompilerIntrinsicsLib/Arm/moddi3.S | 0 .../CompilerIntrinsicsLib/Arm/modsi3.S | 0 .../CompilerIntrinsicsLib/Arm/muldi3.S | 0 .../Library/CompilerIntrinsicsLib/Arm/mullu.S | 0 .../CompilerIntrinsicsLib/Arm/sourcery.S | 0 .../CompilerIntrinsicsLib/Arm/switch16.S | 0 .../CompilerIntrinsicsLib/Arm/switch32.S | 0 .../CompilerIntrinsicsLib/Arm/switch8.S | 0 .../CompilerIntrinsicsLib/Arm/switchu8.S | 0 .../CompilerIntrinsicsLib/Arm/ucmpdi2.S | 0 .../CompilerIntrinsicsLib/Arm/udivdi3.S | 0 .../CompilerIntrinsicsLib/Arm/udivmoddi4.S | 0 .../CompilerIntrinsicsLib/Arm/udivsi3.S | 0 .../Library/CompilerIntrinsicsLib/Arm/uldiv.S | 0 .../CompilerIntrinsicsLib/Arm/uldiv.asm | 0 .../CompilerIntrinsicsLib/Arm/umoddi3.S | 0 .../CompilerIntrinsicsLib/Arm/umodsi3.S | 0 .../Library/CompilerIntrinsicsLib/Arm/uread.S | 0 .../CompilerIntrinsicsLib/Arm/uwrite.S | 0 MdePkg/MdePkg.ci.yaml | 1 + 66 files changed, 19 insertions(+), 20 deletions(-) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/CompilerIntrinsi= csLib.inf (95%) rename {ArmPkg =3D> MdePkg}/Include/AsmMacroIoLib.h (100%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/memcmp_ms.c (100= %) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/memcpy.c (100%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/memcpy_ms.c (100= %) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/memmove_ms.c (10= 0%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/memset.c (100%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/memset_ms.c (100= %) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/AArch64/Atomics.= S (100%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/ashldi3.S (1= 00%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/ashrdi3.S (1= 00%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/clzsi2.S (10= 0%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/ctzsi2.S (10= 0%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/div.S (100%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/div.asm (100= %) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/divdi3.S (10= 0%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/divsi3.S (10= 0%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/lasr.S (100%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/ldivmod.S (1= 00%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/ldivmod.asm = (100%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/llsl.S (100%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/llsr.S (100%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/llsr.asm (10= 0%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/lshrdi3.S (1= 00%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/memmove.S (1= 00%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/moddi3.S (10= 0%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/modsi3.S (10= 0%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/muldi3.S (10= 0%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/mullu.S (100= %) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/sourcery.S (= 100%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/switch16.S (= 100%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/switch32.S (= 100%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/switch8.S (1= 00%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/switchu8.S (= 100%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/ucmpdi2.S (1= 00%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/udivdi3.S (1= 00%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/udivmoddi4.S= (100%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/udivsi3.S (1= 00%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/uldiv.S (100= %) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/uldiv.asm (1= 00%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/umoddi3.S (1= 00%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/umodsi3.S (1= 00%) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/uread.S (100= %) rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/uwrite.S (10= 0%) diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc index f15a3f7f06e4..4b5687927ae8 100644 --- a/ArmVirtPkg/ArmVirt.dsc.inc +++ b/ArmVirtPkg/ArmVirt.dsc.inc @@ -95,7 +95,7 @@ [LibraryClasses.common] # It is not possible to prevent the ARM compiler from inserting calls to= intrinsic functions. # This library provides the instrinsic functions such a compiler may gen= erate calls to. # - NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + NULL|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf =20 # Add support for GCC stack protector NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc b/Unit= TestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc index 8adf690098ae..9f2b671f7c86 100644 --- a/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc +++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc @@ -37,7 +37,7 @@ [LibraryClasses.ARM, LibraryClasses.AARCH64] # This library provides the instrinsic functions generated by a given co= mpiler. # [LibraryClasses.ARM] and NULL mean link this library into all ARM imag= es. # - NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + NULL|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf =20 # # Since software stack checking may be heuristically enabled by the comp= iler diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc index 59fd8f295d4f..f9268de8347e 100644 --- a/ArmPkg/ArmPkg.dsc +++ b/ArmPkg/ArmPkg.dsc @@ -101,7 +101,7 @@ [LibraryClasses.common.PEIM] PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLib/Pei= ServicesTablePointerLib.inf =20 [LibraryClasses.ARM, LibraryClasses.AARCH64] - NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + NULL|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf =20 # Add support for GCC stack protector NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf @@ -109,7 +109,6 @@ [LibraryClasses.ARM, LibraryClasses.AARCH64] [Components.common] ArmPkg/Library/ArmCacheMaintenanceLib/ArmCacheMaintenanceLib.inf ArmPkg/Library/ArmDisassemblerLib/ArmDisassemblerLib.inf - ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf ArmPkg/Library/DebugAgentSymbolsBaseLib/DebugAgentSymbolsBaseLib.inf ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.inf ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerLib.inf diff --git a/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc b/ArmPkg/Dr= ivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc index 2818ce65db98..ac818f0d98a2 100644 --- a/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc +++ b/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc @@ -43,7 +43,7 @@ [LibraryClasses] UefiLib|MdePkg/Library/UefiLib/UefiLib.inf UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/U= efiRuntimeServicesTableLib.inf =20 - NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + NULL|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf =20 [Components.common] diff --git a/ArmPlatformPkg/ArmPlatformPkg.dsc b/ArmPlatformPkg/ArmPlatform= Pkg.dsc index 661a4cea220d..b146e4fe8a69 100644 --- a/ArmPlatformPkg/ArmPlatformPkg.dsc +++ b/ArmPlatformPkg/ArmPlatformPkg.dsc @@ -76,7 +76,7 @@ [LibraryClasses.common] DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/U= efiRuntimeServicesTableLib.inf =20 - NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + NULL|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf =20 [LibraryClasses.common.PEIM] diff --git a/CryptoPkg/CryptoPkg.dsc b/CryptoPkg/CryptoPkg.dsc index 06990cb6fc79..71679687a8b1 100644 --- a/CryptoPkg/CryptoPkg.dsc +++ b/CryptoPkg/CryptoPkg.dsc @@ -74,7 +74,7 @@ [LibraryClasses.ARM, LibraryClasses.AARCH64] # [LibraryClasses.ARM, LibraryClasses.AARCH64] and NULL mean link this l= ibrary # into all ARM and AARCH64 images. # - NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + NULL|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf =20 # Add support for stack protector NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf diff --git a/DynamicTablesPkg/DynamicTablesPkg.dsc b/DynamicTablesPkg/Dynam= icTablesPkg.dsc index 068f0bc63080..c30b0f943a60 100644 --- a/DynamicTablesPkg/DynamicTablesPkg.dsc +++ b/DynamicTablesPkg/DynamicTablesPkg.dsc @@ -34,7 +34,7 @@ [LibraryClasses] UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry= Point.inf =20 [LibraryClasses.ARM, LibraryClasses.AARCH64] - NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + NULL|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf PL011UartLib|ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.inf =20 diff --git a/EmbeddedPkg/EmbeddedPkg.dsc b/EmbeddedPkg/EmbeddedPkg.dsc index e9062cacbb42..14e3cbf1c872 100644 --- a/EmbeddedPkg/EmbeddedPkg.dsc +++ b/EmbeddedPkg/EmbeddedPkg.dsc @@ -128,7 +128,7 @@ [LibraryClasses.ARM, LibraryClasses.AARCH64] ArmGicLib|ArmPkg/Drivers/ArmGic/ArmGicLib.inf ArmSmcLib|ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf SemihostLib|ArmPkg/Library/SemihostLib/SemihostLib.inf - NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + NULL|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf =20 # Add support for GCC stack protector NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf diff --git a/FatPkg/FatPkg.dsc b/FatPkg/FatPkg.dsc index 6fa439e440cb..ba27e9a26173 100644 --- a/FatPkg/FatPkg.dsc +++ b/FatPkg/FatPkg.dsc @@ -56,7 +56,7 @@ [LibraryClasses.common.PEIM] MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAlloc= ationLib.inf =20 [LibraryClasses.ARM, LibraryClasses.AARCH64] - NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + NULL|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf =20 ##########################################################################= ######################### diff --git a/FmpDevicePkg/FmpDevicePkg.dsc b/FmpDevicePkg/FmpDevicePkg.dsc index 7b1af285dd65..258b5ce0cded 100644 --- a/FmpDevicePkg/FmpDevicePkg.dsc +++ b/FmpDevicePkg/FmpDevicePkg.dsc @@ -78,7 +78,7 @@ [LibraryClasses.ARM, LibraryClasses.AARCH64] # [LibraryClasses.ARM, LibraryClasses.AARCH64] and NULL mean link this l= ibrary # into all ARM and AARCH64 images. # - NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + NULL|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf =20 # Add support for stack protector NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc index 90a0a7ec4a7c..314a4f543aba 100644 --- a/MdeModulePkg/MdeModulePkg.dsc +++ b/MdeModulePkg/MdeModulePkg.dsc @@ -184,7 +184,7 @@ [LibraryClasses.ARM, LibraryClasses.AARCH64] # This library provides the instrinsic functions generated by a given co= mpiler. # [LibraryClasses.ARM] and NULL mean link this library into all ARM imag= es. # - NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + NULL|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf =20 # # Since software stack checking may be heuristically enabled by the comp= iler diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc index 3d8874e64782..7bf18af1da20 100644 --- a/MdePkg/MdePkg.dsc +++ b/MdePkg/MdePkg.dsc @@ -36,6 +36,7 @@ [LibraryClasses] =20 [Components] MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf + MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf MdePkg/Library/BaseCacheMaintenanceLibNull/BaseCacheMaintenanceLibNull.i= nf MdePkg/Library/BaseCpuLib/BaseCpuLib.inf diff --git a/NetworkPkg/NetworkPkg.dsc b/NetworkPkg/NetworkPkg.dsc index 762134023d3f..f69eb3d1d5c2 100644 --- a/NetworkPkg/NetworkPkg.dsc +++ b/NetworkPkg/NetworkPkg.dsc @@ -76,7 +76,7 @@ [LibraryClasses.ARM, LibraryClasses.AARCH64] # This library provides the instrinsic functions generated by a given co= mpiler. # [LibraryClasses.ARM] and NULL mean link this library into all ARM imag= es. # - NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + NULL|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf ArmSoftFloatLib|ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf =20 diff --git a/RedfishPkg/RedfishPkg.dsc b/RedfishPkg/RedfishPkg.dsc index 16139146ff83..0dc120d82699 100644 --- a/RedfishPkg/RedfishPkg.dsc +++ b/RedfishPkg/RedfishPkg.dsc @@ -45,7 +45,7 @@ [LibraryClasses.ARM, LibraryClasses.AARCH64] # # This library provides the instrinsic functions generated by a given co= mpiler. # - NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + NULL|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf ArmSoftFloatLib|ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf =20 diff --git a/SecurityPkg/SecurityPkg.dsc b/SecurityPkg/SecurityPkg.dsc index 73a93c2285b1..2b5ef67016b8 100644 --- a/SecurityPkg/SecurityPkg.dsc +++ b/SecurityPkg/SecurityPkg.dsc @@ -79,7 +79,7 @@ [LibraryClasses.ARM, LibraryClasses.AARCH64] # This library provides the intrinsic functions generate by a given comp= iler. # And NULL mean link this library into all ARM images. # - NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + NULL|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf =20 # Add support for GCC stack protector NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf diff --git a/ShellPkg/ShellPkg.dsc b/ShellPkg/ShellPkg.dsc index 38fde3dc71dd..a166af0a81ae 100644 --- a/ShellPkg/ShellPkg.dsc +++ b/ShellPkg/ShellPkg.dsc @@ -70,7 +70,7 @@ [LibraryClasses.ARM,LibraryClasses.AARCH64] # This library provides the instrinsic functions generate by a given com= piler. # [LibraryClasses.ARM] and NULL mean link this library into all ARM imag= es. # - NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + NULL|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf =20 # Add support for GCC stack protector NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf diff --git a/SignedCapsulePkg/SignedCapsulePkg.dsc b/SignedCapsulePkg/Signe= dCapsulePkg.dsc index 8a27207a6f20..72b533cd04e8 100644 --- a/SignedCapsulePkg/SignedCapsulePkg.dsc +++ b/SignedCapsulePkg/SignedCapsulePkg.dsc @@ -104,7 +104,7 @@ [LibraryClasses.AARCH64, LibraryClasses.ARM] # This library provides the instrinsic functions generate by a given com= piler. # And NULL mean link this library into all ARM images. # - NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + NULL|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf =20 # Add support for GCC stack protector NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf diff --git a/StandaloneMmPkg/StandaloneMmPkg.dsc b/StandaloneMmPkg/Standalo= neMmPkg.dsc index 8012f93b7dcc..e9488538cb21 100644 --- a/StandaloneMmPkg/StandaloneMmPkg.dsc +++ b/StandaloneMmPkg/StandaloneMmPkg.dsc @@ -67,7 +67,7 @@ [LibraryClasses.AARCH64, LibraryClasses.ARM] CacheMaintenanceLib|ArmPkg/Library/ArmCacheMaintenanceLib/ArmCacheMainte= nanceLib.inf PeCoffExtraActionLib|StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActi= onLib/StandaloneMmPeCoffExtraActionLib.inf =20 - NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + NULL|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf =20 [LibraryClasses.common.MM_CORE_STANDALONE] diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf= b/MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf similarity index 95% rename from ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf rename to MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf index 7e22e6f67bff..a1559fc40ce9 100644 --- a/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf +++ b/MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf @@ -69,7 +69,6 @@ [Sources.AARCH64] =20 [Packages] MdePkg/MdePkg.dec - ArmPkg/ArmPkg.dec =20 [BuildOptions] MSFT:*_*_*_CC_FLAGS =3D /GL- diff --git a/ArmPkg/Include/AsmMacroIoLib.h b/MdePkg/Include/AsmMacroIoLib.h similarity index 100% rename from ArmPkg/Include/AsmMacroIoLib.h rename to MdePkg/Include/AsmMacroIoLib.h diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/memcmp_ms.c b/MdePkg/Libr= ary/CompilerIntrinsicsLib/memcmp_ms.c similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/memcmp_ms.c rename to MdePkg/Library/CompilerIntrinsicsLib/memcmp_ms.c diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/memcpy.c b/MdePkg/Library= /CompilerIntrinsicsLib/memcpy.c similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/memcpy.c rename to MdePkg/Library/CompilerIntrinsicsLib/memcpy.c diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/memcpy_ms.c b/MdePkg/Libr= ary/CompilerIntrinsicsLib/memcpy_ms.c similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/memcpy_ms.c rename to MdePkg/Library/CompilerIntrinsicsLib/memcpy_ms.c diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/memmove_ms.c b/MdePkg/Lib= rary/CompilerIntrinsicsLib/memmove_ms.c similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/memmove_ms.c rename to MdePkg/Library/CompilerIntrinsicsLib/memmove_ms.c diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/memset.c b/MdePkg/Library= /CompilerIntrinsicsLib/memset.c similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/memset.c rename to MdePkg/Library/CompilerIntrinsicsLib/memset.c diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/memset_ms.c b/MdePkg/Libr= ary/CompilerIntrinsicsLib/memset_ms.c similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/memset_ms.c rename to MdePkg/Library/CompilerIntrinsicsLib/memset_ms.c diff --git a/ArmPkg/ArmPkg.ci.yaml b/ArmPkg/ArmPkg.ci.yaml index b7e07aaef675..cb892894f3b8 100644 --- a/ArmPkg/ArmPkg.ci.yaml +++ b/ArmPkg/ArmPkg.ci.yaml @@ -21,7 +21,6 @@ "IgnoreFiles": [ "Library/ArmSoftFloatLib/berkeley-softfloat-3", "Library/ArmSoftFloatLib/ArmSoftFloatLib.c", - "Library/CompilerIntrinsicsLib", "Universal/Smbios/SmbiosMiscDxe" ] }, diff --git a/BaseTools/Bin/Darwin-i386/Arm/DEBUG_XCODE31/CompilerIntrinsics= Lib.lib b/BaseTools/Bin/Darwin-i386/Arm/DEBUG_XCODE31/CompilerIntrinsicsLib= .lib index 79964fe1b65afe472af19fdb87c2733f5297d0a4..712aa917bcd0342a4d47923d208= cf866992fbe5a 100644 GIT binary patch delta 369 zcmaDclj+4wrVZcNChyH;pZru!X|p{0WhOAkR3vJ1FxP*COts)pM)d`(`e`e=3Dv^AX8%A3eyFkTn{OrrLOis!P7c(KA+Pt;U2_YIr99CqGnE+bqw1nF-7>6p7m$%=3DI53Q!Tg|EVJ2AH=3D;plnjGj0%oTF*Pgy0mKeuC%$DO+hFhtR`o z+k)U+cWei9HYd6%!bDv*pY-|;)9k*P%kLkIuEObMNhL%i)c~xz*aLp2gjA%V0%y#F^G0l*mnGAAzXxk;2?arHXI}x18 Htv$&A)|`a2 diff --git a/BaseTools/Bin/Darwin-i386/Arm/DEBUG_XCODE32/CompilerIntrinsics= Lib.lib b/BaseTools/Bin/Darwin-i386/Arm/DEBUG_XCODE32/CompilerIntrinsicsLib= .lib index 79964fe1b65afe472af19fdb87c2733f5297d0a4..712aa917bcd0342a4d47923d208= cf866992fbe5a 100644 GIT binary patch delta 369 zcmaDclj+4wrVZcNChyH;pZru!X|p{0WhOAkR3vJ1FxP*COts)pM)d`(`e`e=3Dv^AX8%A3eyFkTn{OrrLOis!P7c(KA+Pt;U2_YIr99CqGnE+bqw1nF-7>6p7m$%=3DI53Q!Tg|EVJ2AH=3D;plnjGj0%oTF*Pgy0mKeuC%$DO+hFhtR`o z+k)U+cWei9HYd6%!bDv*pY-|;)9k*P%kLkIuEObMNhL%i)c~xz*aLp2gjA%V0%y#F^G0l*mnGAAzXxk;2?arHXI}x18 Htv$&A)|`a2 diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/AArch64/Atomics.S b/MdePk= g/Library/CompilerIntrinsicsLib/AArch64/Atomics.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/AArch64/Atomics.S rename to MdePkg/Library/CompilerIntrinsicsLib/AArch64/Atomics.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ashldi3.S b/MdePkg/Li= brary/CompilerIntrinsicsLib/Arm/ashldi3.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/ashldi3.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/ashldi3.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ashrdi3.S b/MdePkg/Li= brary/CompilerIntrinsicsLib/Arm/ashrdi3.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/ashrdi3.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/ashrdi3.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/clzsi2.S b/MdePkg/Lib= rary/CompilerIntrinsicsLib/Arm/clzsi2.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/clzsi2.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/clzsi2.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ctzsi2.S b/MdePkg/Lib= rary/CompilerIntrinsicsLib/Arm/ctzsi2.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/ctzsi2.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/ctzsi2.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/div.S b/MdePkg/Librar= y/CompilerIntrinsicsLib/Arm/div.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/div.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/div.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/div.asm b/MdePkg/Libr= ary/CompilerIntrinsicsLib/Arm/div.asm similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/div.asm rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/div.asm diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/divdi3.S b/MdePkg/Lib= rary/CompilerIntrinsicsLib/Arm/divdi3.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/divdi3.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/divdi3.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/divsi3.S b/MdePkg/Lib= rary/CompilerIntrinsicsLib/Arm/divsi3.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/divsi3.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/divsi3.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/lasr.S b/MdePkg/Libra= ry/CompilerIntrinsicsLib/Arm/lasr.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/lasr.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/lasr.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ldivmod.S b/MdePkg/Li= brary/CompilerIntrinsicsLib/Arm/ldivmod.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/ldivmod.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/ldivmod.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ldivmod.asm b/MdePkg/= Library/CompilerIntrinsicsLib/Arm/ldivmod.asm similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/ldivmod.asm rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/ldivmod.asm diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/llsl.S b/MdePkg/Libra= ry/CompilerIntrinsicsLib/Arm/llsl.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/llsl.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/llsl.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/llsr.S b/MdePkg/Libra= ry/CompilerIntrinsicsLib/Arm/llsr.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/llsr.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/llsr.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/llsr.asm b/MdePkg/Lib= rary/CompilerIntrinsicsLib/Arm/llsr.asm similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/llsr.asm rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/llsr.asm diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/lshrdi3.S b/MdePkg/Li= brary/CompilerIntrinsicsLib/Arm/lshrdi3.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/lshrdi3.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/lshrdi3.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/memmove.S b/MdePkg/Li= brary/CompilerIntrinsicsLib/Arm/memmove.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/memmove.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/memmove.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/moddi3.S b/MdePkg/Lib= rary/CompilerIntrinsicsLib/Arm/moddi3.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/moddi3.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/moddi3.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/modsi3.S b/MdePkg/Lib= rary/CompilerIntrinsicsLib/Arm/modsi3.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/modsi3.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/modsi3.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/muldi3.S b/MdePkg/Lib= rary/CompilerIntrinsicsLib/Arm/muldi3.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/muldi3.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/muldi3.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/mullu.S b/MdePkg/Libr= ary/CompilerIntrinsicsLib/Arm/mullu.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/mullu.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/mullu.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/sourcery.S b/MdePkg/L= ibrary/CompilerIntrinsicsLib/Arm/sourcery.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/sourcery.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/sourcery.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/switch16.S b/MdePkg/L= ibrary/CompilerIntrinsicsLib/Arm/switch16.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/switch16.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/switch16.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/switch32.S b/MdePkg/L= ibrary/CompilerIntrinsicsLib/Arm/switch32.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/switch32.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/switch32.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/switch8.S b/MdePkg/Li= brary/CompilerIntrinsicsLib/Arm/switch8.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/switch8.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/switch8.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/switchu8.S b/MdePkg/L= ibrary/CompilerIntrinsicsLib/Arm/switchu8.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/switchu8.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/switchu8.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ucmpdi2.S b/MdePkg/Li= brary/CompilerIntrinsicsLib/Arm/ucmpdi2.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/ucmpdi2.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/ucmpdi2.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/udivdi3.S b/MdePkg/Li= brary/CompilerIntrinsicsLib/Arm/udivdi3.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/udivdi3.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/udivdi3.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/udivmoddi4.S b/MdePkg= /Library/CompilerIntrinsicsLib/Arm/udivmoddi4.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/udivmoddi4.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/udivmoddi4.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/udivsi3.S b/MdePkg/Li= brary/CompilerIntrinsicsLib/Arm/udivsi3.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/udivsi3.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/udivsi3.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/uldiv.S b/MdePkg/Libr= ary/CompilerIntrinsicsLib/Arm/uldiv.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/uldiv.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/uldiv.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/uldiv.asm b/MdePkg/Li= brary/CompilerIntrinsicsLib/Arm/uldiv.asm similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/uldiv.asm rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/uldiv.asm diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/umoddi3.S b/MdePkg/Li= brary/CompilerIntrinsicsLib/Arm/umoddi3.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/umoddi3.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/umoddi3.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/umodsi3.S b/MdePkg/Li= brary/CompilerIntrinsicsLib/Arm/umodsi3.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/umodsi3.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/umodsi3.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/uread.S b/MdePkg/Libr= ary/CompilerIntrinsicsLib/Arm/uread.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/uread.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/uread.S diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/uwrite.S b/MdePkg/Lib= rary/CompilerIntrinsicsLib/Arm/uwrite.S similarity index 100% rename from ArmPkg/Library/CompilerIntrinsicsLib/Arm/uwrite.S rename to MdePkg/Library/CompilerIntrinsicsLib/Arm/uwrite.S diff --git a/MdePkg/MdePkg.ci.yaml b/MdePkg/MdePkg.ci.yaml index 054233ebc7bd..34300c06e36a 100644 --- a/MdePkg/MdePkg.ci.yaml +++ b/MdePkg/MdePkg.ci.yaml @@ -52,6 +52,7 @@ "Include/IndustryStandard/UefiTcgPlatform.h", "Include/Library/PcdLib.h", "Include/Library/SafeIntLib.h", + "Library/CompilerIntrinsicsLib", "Test/UnitTest/Library/BaseSafeIntLib/TestBaseSafeIntLib.c" ] }, --=20 2.36.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 (#90180): https://edk2.groups.io/g/devel/message/90180 Mute This Topic: https://groups.io/mt/91519701/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 16 16:08:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+90181+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90181+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654259210; cv=none; d=zohomail.com; s=zohoarc; b=JfY8SDGJIjfPwJnEfGeyqRes6STDO9vpnPTER4YYpGIfq2f32e44Mqcavz7Te0iDhZh7HW/aHv0zgN9e4RXgoWLIWnBteZ7ftNs2Ty362JB8nwLbxJXRcqR6ll9wtEUOMr2P2/XvciWsQmg1g058NuWaE2Kq9NCX0EHmUSkLtHc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654259210; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=kBTsyQOKaNzHjpfQDrFoKc0nC5Bza5UrH5Vw6aM+bs8=; b=bgONBSBM5MLBhBNXarAqx0XBXT/u2orGBJB3C7mY1Pvhfkoyb12IJpU6I1PsbARb4VeylIMf/gr3FY4lQwxgZFiuOd/9nY5SfYSIJBbeKh3g67lIjxTmS+/7NeNvvuzY6IlhSn/9CPzs42fe2+LXgS8Q0xs4w96w0ew/GhBeY9A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90181+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1654259210050667.8491383540551; Fri, 3 Jun 2022 05:26:50 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 0e5dYY1788612xu8G7qQQV2f; Fri, 03 Jun 2022 05:26:49 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web09.6547.1654259208772368697 for ; Fri, 03 Jun 2022 05:26:49 -0700 X-Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-398-9sbONNj4O2m9c62UHbNwZQ-1; Fri, 03 Jun 2022 08:26:46 -0400 X-MC-Unique: 9sbONNj4O2m9c62UHbNwZQ-1 X-Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 63D87280695A; Fri, 3 Jun 2022 12:26:44 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 13B3C10725; Fri, 3 Jun 2022 12:26:44 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 006BB18009D1; Fri, 3 Jun 2022 14:26:38 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Jian J Wang , Jiaxin Wu , Sean Brogan , Anthony Perard , Leif Lindholm , Zhiguang Liu , Xiaoyu Lu , Pawel Polawski , Sami Mujawar , Maciej Rabeda , Bob Feng , Jiewen Yao , Andrew Fish , Bret Barkelew , Alexei Fedorov , Guo Dong , Gerd Hoffmann , kilian_kegel@hotmail.com, Maurice Ma , Siyuan Fu , Abner Chang , Zhichao Gao , Wei6 Xu , Supreeth Venkatesh , Julien Grall , Daniel Schaefer , Ard Biesheuvel , Guomin Jiang , Jordan Justen , Oliver Steffen , Sebastien Boeuf , Benjamin You , Min Xu , Ray Ni , Rebecca Cran , Nickle Wang , Michael D Kinney , Tom Lendacky , Sami Mujawar , Peter Grehan , Erdem Aktas , Brijesh Singh , James Bottomley , Yuwei Chen , Liming Gao , Jiewen Yao , Ard Biesheuvel Subject: [edk2-devel] [PATCH v4 2/9] MdePkg/CompilerIntrinsicsLib: fix msft sources for x64 Date: Fri, 3 Jun 2022 14:26:31 +0200 Message-Id: <20220603122638.1547060-3-kraxel@redhat.com> In-Reply-To: <20220603122638.1547060-1-kraxel@redhat.com> References: <20220603122638.1547060-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: 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,kraxel@redhat.com X-Gm-Message-State: OHHWdmDCaKGtEYOmg1hDyKj1x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1654259209; bh=UW3bjMbl9TZ1NlYEJMpuawEOjuPe4QgVdGw2v2Z6Xf8=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=lDbGCJpRjK3imxscR9/GZYz/y/HZjLwX4vRt+APRfC3ObWQjS+mmdCMcNQj3T5ORXEn 9rmFVi4FlZ3xtTewjQG+/cmxmP2apqEpEuDE4U8JUUtRI7s2NnuzBtTqnywTPtPdbSVPa m5lSEiK/HR0eQM/sRtcmbXTBIul6plQ0Je8= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1654259210640100003 Content-Type: text/plain; charset="utf-8"; x-default="true" Update #if conditions so the 64bit version is picked for X64 too. Signed-off-by: Gerd Hoffmann Acked-by: Jiewen Yao Acked-by: Ard Biesheuvel Acked-by: Liming Gao --- MdePkg/Library/CompilerIntrinsicsLib/memcmp_ms.c | 2 +- MdePkg/Library/CompilerIntrinsicsLib/memcpy_ms.c | 2 +- MdePkg/Library/CompilerIntrinsicsLib/memmove_ms.c | 2 +- MdePkg/Library/CompilerIntrinsicsLib/memset_ms.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MdePkg/Library/CompilerIntrinsicsLib/memcmp_ms.c b/MdePkg/Libr= ary/CompilerIntrinsicsLib/memcmp_ms.c index cedbfca47139..2fac8f1e23e3 100644 --- a/MdePkg/Library/CompilerIntrinsicsLib/memcmp_ms.c +++ b/MdePkg/Library/CompilerIntrinsicsLib/memcmp_ms.c @@ -7,7 +7,7 @@ // // -----------------------------------------------------------------------= ------- =20 -#if defined (_M_ARM64) +#if defined (_M_ARM64) || defined (_M_X64) typedef unsigned __int64 size_t; #else typedef unsigned __int32 size_t; diff --git a/MdePkg/Library/CompilerIntrinsicsLib/memcpy_ms.c b/MdePkg/Libr= ary/CompilerIntrinsicsLib/memcpy_ms.c index 0eafa83ed476..730aa806d50b 100644 --- a/MdePkg/Library/CompilerIntrinsicsLib/memcpy_ms.c +++ b/MdePkg/Library/CompilerIntrinsicsLib/memcpy_ms.c @@ -7,7 +7,7 @@ // // -----------------------------------------------------------------------= ------- =20 -#if defined (_M_ARM64) +#if defined (_M_ARM64) || defined (_M_X64) typedef unsigned __int64 size_t; #else typedef unsigned __int32 size_t; diff --git a/MdePkg/Library/CompilerIntrinsicsLib/memmove_ms.c b/MdePkg/Lib= rary/CompilerIntrinsicsLib/memmove_ms.c index f68eb52a6ca5..3207b94a8675 100644 --- a/MdePkg/Library/CompilerIntrinsicsLib/memmove_ms.c +++ b/MdePkg/Library/CompilerIntrinsicsLib/memmove_ms.c @@ -7,7 +7,7 @@ // // -----------------------------------------------------------------------= ------- =20 -#if defined (_M_ARM64) +#if defined (_M_ARM64) || defined (_M_X64) typedef unsigned __int64 size_t; #else typedef unsigned __int32 size_t; diff --git a/MdePkg/Library/CompilerIntrinsicsLib/memset_ms.c b/MdePkg/Libr= ary/CompilerIntrinsicsLib/memset_ms.c index 5882cd28b06d..deb902c6ae88 100644 --- a/MdePkg/Library/CompilerIntrinsicsLib/memset_ms.c +++ b/MdePkg/Library/CompilerIntrinsicsLib/memset_ms.c @@ -7,7 +7,7 @@ // // -----------------------------------------------------------------------= ------- =20 -#if defined (_M_ARM64) +#if defined (_M_ARM64) || defined (_M_X64) typedef unsigned __int64 size_t; #else typedef unsigned __int32 size_t; --=20 2.36.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 (#90181): https://edk2.groups.io/g/devel/message/90181 Mute This Topic: https://groups.io/mt/91519702/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 16 16:08:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+90183+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90183+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654259214; cv=none; d=zohomail.com; s=zohoarc; b=i+4jJJC261p9K+kbUOHoi3AE03qAwWIsbckQkPBmVHB5FwNUzGdKbJ4Wu/euvEmpxnp5AsIT1DPbfMh+KjpDNPV3zFtze2vvLDusuBgaWnvqeeKS/S1WjBA7YPzj4X6FgphyrUW8dAfH+YZGt6DOJiicSeziO37B4BO9xylKvtw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654259214; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=qldmSbgimXwXXpt79Z9/u+t2+haDPbMZCpYJKpMswAY=; b=WcocIcqsNgLVSinw0bIBHSRdOa4wX2GZLZEMj/qPGnEblTvn/QkQgX9sqcdTsyE6oIa3scJP3yoskgHf9O98Ni4JYzi/6odNdHLA1mkAUVjIXHwjqK2fmbkHav1E3MInAUR5MGeDAW8sAawHZieTpudjcsubFQp5iYsF7OL0YWA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90183+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1654259214144480.65273046117886; Fri, 3 Jun 2022 05:26:54 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id TmiHYY1788612xAzrBVQmuyY; Fri, 03 Jun 2022 05:26:53 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web12.6657.1654259212607834846 for ; Fri, 03 Jun 2022 05:26:53 -0700 X-Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-637-oPg_ehXuOCeVC7ues_FI3w-1; Fri, 03 Jun 2022 08:26:46 -0400 X-MC-Unique: oPg_ehXuOCeVC7ues_FI3w-1 X-Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 82B9B3C1014B; Fri, 3 Jun 2022 12:26:44 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 17F5E1410F36; Fri, 3 Jun 2022 12:26:44 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0530618009D2; Fri, 3 Jun 2022 14:26:39 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Jian J Wang , Jiaxin Wu , Sean Brogan , Anthony Perard , Leif Lindholm , Zhiguang Liu , Xiaoyu Lu , Pawel Polawski , Sami Mujawar , Maciej Rabeda , Bob Feng , Jiewen Yao , Andrew Fish , Bret Barkelew , Alexei Fedorov , Guo Dong , Gerd Hoffmann , kilian_kegel@hotmail.com, Maurice Ma , Siyuan Fu , Abner Chang , Zhichao Gao , Wei6 Xu , Supreeth Venkatesh , Julien Grall , Daniel Schaefer , Ard Biesheuvel , Guomin Jiang , Jordan Justen , Oliver Steffen , Sebastien Boeuf , Benjamin You , Min Xu , Ray Ni , Rebecca Cran , Nickle Wang , Michael D Kinney , Tom Lendacky , Sami Mujawar , Peter Grehan , Erdem Aktas , Brijesh Singh , James Bottomley , Yuwei Chen , Liming Gao Subject: [edk2-devel] [PATCH v4 3/9] MdePkg/CompilerIntrinsicsLib: move size_t typedef to header file Date: Fri, 3 Jun 2022 14:26:32 +0200 Message-Id: <20220603122638.1547060-4-kraxel@redhat.com> In-Reply-To: <20220603122638.1547060-1-kraxel@redhat.com> References: <20220603122638.1547060-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: 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,kraxel@redhat.com X-Gm-Message-State: vePCpkxN1BajPnpxQgo1hfYlx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1654259213; bh=FrbArTkMw/bWYCMcdHXPDHjenRapOwx25mMYxUpX2qg=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=fwqPX9jh5JpNpEmKzMf6uvNbSeBA/r+CZuLMirHH6V1azSGrR6a/nCad9Q8iDFMT1xQ V+JO/BxUIf3Ssv0M6JyW2oX4j+vQQsO23XHSw9313eYJpbJ4jBQbN5AJdYmbAYyTdX+gm 1RbDJu19bwK7lO6UieWquxxcxJOtaxPOD5c= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1654259214821100013 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Gerd Hoffmann Acked-by: Liming Gao --- .../{memset_ms.c =3D> types_ms.h} | 29 +------------------ .../Library/CompilerIntrinsicsLib/memcpy_ms.c | 6 +--- .../CompilerIntrinsicsLib/memmove_ms.c | 6 +--- .../Library/CompilerIntrinsicsLib/memset_ms.c | 6 +--- 4 files changed, 4 insertions(+), 43 deletions(-) copy MdePkg/Library/CompilerIntrinsicsLib/{memset_ms.c =3D> types_ms.h} (5= 2%) diff --git a/MdePkg/Library/CompilerIntrinsicsLib/memset_ms.c b/MdePkg/Libr= ary/CompilerIntrinsicsLib/types_ms.h similarity index 52% copy from MdePkg/Library/CompilerIntrinsicsLib/memset_ms.c copy to MdePkg/Library/CompilerIntrinsicsLib/types_ms.h index deb902c6ae88..d8b578be1f46 100644 --- a/MdePkg/Library/CompilerIntrinsicsLib/memset_ms.c +++ b/MdePkg/Library/CompilerIntrinsicsLib/types_ms.h @@ -1,6 +1,6 @@ // -----------------------------------------------------------------------= ------- // -// Copyright (c) 2017, Pete Batard. All rights reserved.
+// Copyright (c) 2019, Pete Batard. All rights reserved. // Copyright (c) 2021, Arm Limited. All rights reserved.
// // SPDX-License-Identifier: BSD-2-Clause-Patent @@ -12,30 +12,3 @@ typedef unsigned __int64 size_t; #else typedef unsigned __int32 size_t; #endif - -void * -memset ( - void *, - int, - size_t - ); - -#pragma intrinsic(memset) -#pragma function(memset) -void * -memset ( - void *s, - int c, - size_t n - ) -{ - unsigned char *d; - - d =3D s; - - while (n-- !=3D 0) { - *d++ =3D (unsigned char)c; - } - - return s; -} diff --git a/MdePkg/Library/CompilerIntrinsicsLib/memcpy_ms.c b/MdePkg/Libr= ary/CompilerIntrinsicsLib/memcpy_ms.c index 730aa806d50b..d2c3d7198121 100644 --- a/MdePkg/Library/CompilerIntrinsicsLib/memcpy_ms.c +++ b/MdePkg/Library/CompilerIntrinsicsLib/memcpy_ms.c @@ -7,11 +7,7 @@ // // -----------------------------------------------------------------------= ------- =20 -#if defined (_M_ARM64) || defined (_M_X64) -typedef unsigned __int64 size_t; -#else -typedef unsigned __int32 size_t; -#endif +#include "types_ms.h" =20 void * memcpy ( diff --git a/MdePkg/Library/CompilerIntrinsicsLib/memmove_ms.c b/MdePkg/Lib= rary/CompilerIntrinsicsLib/memmove_ms.c index 3207b94a8675..837744a2920c 100644 --- a/MdePkg/Library/CompilerIntrinsicsLib/memmove_ms.c +++ b/MdePkg/Library/CompilerIntrinsicsLib/memmove_ms.c @@ -7,11 +7,7 @@ // // -----------------------------------------------------------------------= ------- =20 -#if defined (_M_ARM64) || defined (_M_X64) -typedef unsigned __int64 size_t; -#else -typedef unsigned __int32 size_t; -#endif +#include "types_ms.h" =20 void * memmove ( diff --git a/MdePkg/Library/CompilerIntrinsicsLib/memset_ms.c b/MdePkg/Libr= ary/CompilerIntrinsicsLib/memset_ms.c index deb902c6ae88..3569bebdf80b 100644 --- a/MdePkg/Library/CompilerIntrinsicsLib/memset_ms.c +++ b/MdePkg/Library/CompilerIntrinsicsLib/memset_ms.c @@ -7,11 +7,7 @@ // // -----------------------------------------------------------------------= ------- =20 -#if defined (_M_ARM64) || defined (_M_X64) -typedef unsigned __int64 size_t; -#else -typedef unsigned __int32 size_t; -#endif +#include "types_ms.h" =20 void * memset ( --=20 2.36.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 (#90183): https://edk2.groups.io/g/devel/message/90183 Mute This Topic: https://groups.io/mt/91519709/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 16 16:08:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+90187+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90187+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654259217; cv=none; d=zohomail.com; s=zohoarc; b=U1oB1fcs7f65CXcqhLjiVqmrb5KCW7MSvBbM2WzF6NCJEMzJRdg5hVdS0PBLrKeZH+6zs1/L0Jdl5T/uu9wJLK+8bYtWwFDFdPBn3GoFAGQknPJcJrcY6hkwFtL3PoxjOHjIzfeKVbuZ3ljZ+nlzOyHeOHL7kTfWt/kUj4scpbQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654259217; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=WMu7tXMCjFoL15muzwdK3CuiZnu78EIELLTal38aB0c=; b=WGoNlRXw9Er7xW5QxjMSG8ASSzAXx8ktz8d/KjsJObNlUd+bUN2zp4yLfda4Qz0KDe4KTuEnnRfWjhL8hhG1xnOY6E28B+v3EgcxV4lkaCAYy5MfLCt4AzVsL8RIlyKPHMwS6e6VZvnFmmR15AP6beqD8mzPVnF1yCsFJuO4hXo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90187+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1654259217425834.8059668502204; Fri, 3 Jun 2022 05:26:57 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id LXdaYY1788612xWItfu7sFCa; Fri, 03 Jun 2022 05:26:56 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.6659.1654259215439563227 for ; Fri, 03 Jun 2022 05:26:55 -0700 X-Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-626-6xHA0qazNXCGziOx74KmWQ-1; Fri, 03 Jun 2022 08:26:48 -0400 X-MC-Unique: 6xHA0qazNXCGziOx74KmWQ-1 X-Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7E0742806959; Fri, 3 Jun 2022 12:26:46 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DBB5B7AD8; Fri, 3 Jun 2022 12:26:45 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0A61818009D3; Fri, 3 Jun 2022 14:26:39 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Jian J Wang , Jiaxin Wu , Sean Brogan , Anthony Perard , Leif Lindholm , Zhiguang Liu , Xiaoyu Lu , Pawel Polawski , Sami Mujawar , Maciej Rabeda , Bob Feng , Jiewen Yao , Andrew Fish , Bret Barkelew , Alexei Fedorov , Guo Dong , Gerd Hoffmann , kilian_kegel@hotmail.com, Maurice Ma , Siyuan Fu , Abner Chang , Zhichao Gao , Wei6 Xu , Supreeth Venkatesh , Julien Grall , Daniel Schaefer , Ard Biesheuvel , Guomin Jiang , Jordan Justen , Oliver Steffen , Sebastien Boeuf , Benjamin You , Min Xu , Ray Ni , Rebecca Cran , Nickle Wang , Michael D Kinney , Tom Lendacky , Sami Mujawar , Peter Grehan , Erdem Aktas , Brijesh Singh , James Bottomley , Yuwei Chen , Liming Gao , Jiewen Yao , Ard Biesheuvel Subject: [edk2-devel] [PATCH v4 4/9] MdePkg/CompilerIntrinsicsLib: move ia32 intrinsics and strcmp Date: Fri, 3 Jun 2022 14:26:33 +0200 Message-Id: <20220603122638.1547060-5-kraxel@redhat.com> In-Reply-To: <20220603122638.1547060-1-kraxel@redhat.com> References: <20220603122638.1547060-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: 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,kraxel@redhat.com X-Gm-Message-State: ujD1fGy2CwIjC7UlB0yfSxOKx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1654259216; bh=hyRCJni0k7N+TskhmQKXA41oFClH9YBGRiEP0Q2A/z4=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=OEFlkVlImkMzbD2lTwO87JuigZ76uzTvmpLIfbXjC8Vc6f95OQXoVp4ifsOjuBedCbH PSGv24PNP4tPKHpxbDB/8Tukd0zNyuFvDpoTc4cWhuubyb54+kOfOykg7o6mueYxm3Iss 3OO0kNIWnuK73ncI7m1DnBQy0Urs+yW49mc= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1654259218851100037 Content-Type: text/plain; charset="utf-8"; x-default="true" Move intrinsics for ia32 from CryptoPkg/Library/IntrinsicLib to MdePkg/Library/CompilerIntrinsicsLib. Also move strcmp. Remove CryptoPkg/Library/IntrinsicLib. Use MdePkg/Library/CompilerIntrinsicsLib instead. Update all references. Signed-off-by: Gerd Hoffmann Acked-by: Jiewen Yao Acked-by: Ard Biesheuvel Acked-by: Liming Gao --- ArmVirtPkg/ArmVirt.dsc.inc | 2 +- CryptoPkg/CryptoPkg.dsc | 3 +- EmulatorPkg/EmulatorPkg.dsc | 2 +- FmpDevicePkg/FmpDevicePkg.dsc | 2 +- NetworkPkg/NetworkPkg.dsc | 2 +- OvmfPkg/AmdSev/AmdSevX64.dsc | 2 +- OvmfPkg/Bhyve/BhyveX64.dsc | 2 +- OvmfPkg/CloudHv/CloudHvX64.dsc | 2 +- OvmfPkg/IntelTdx/IntelTdxX64.dsc | 2 +- OvmfPkg/Microvm/MicrovmX64.dsc | 2 +- OvmfPkg/OvmfPkgIa32.dsc | 2 +- OvmfPkg/OvmfPkgIa32X64.dsc | 2 +- OvmfPkg/OvmfPkgX64.dsc | 2 +- OvmfPkg/OvmfXen.dsc | 2 +- SecurityPkg/SecurityPkg.dsc | 10 +-- SignedCapsulePkg/SignedCapsulePkg.dsc | 12 +-- UefiPayloadPkg/UefiPayloadPkg.dsc | 2 +- .../Library/IntrinsicLib/IntrinsicLib.inf | 69 ----------------- .../CompilerIntrinsicsLib.inf | 16 ++++ CryptoPkg/Library/IntrinsicLib/CopyMem.c | 47 ------------ .../Library/IntrinsicLib/MemoryIntrinsics.c | 74 ------------------- .../CompilerIntrinsicsLib}/Ia32/MathFtol.c | 0 .../Ia32/MathLShiftS64.c | 0 .../Ia32/MathRShiftU64.c | 0 MdePkg/Library/CompilerIntrinsicsLib/strcmp.c | 33 +++++++++ .../Library/IntrinsicLib/BaseIntrinsicLib.uni | 16 ---- .../Ia32/MathLShiftS64.nasm | 0 .../CompilerIntrinsicsLib}/Ia32/MathLlmul.asm | 0 .../CompilerIntrinsicsLib}/Ia32/MathLlshr.asm | 0 .../Ia32/MathRShiftU64.nasm | 0 30 files changed, 75 insertions(+), 233 deletions(-) delete mode 100644 CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf delete mode 100644 CryptoPkg/Library/IntrinsicLib/CopyMem.c delete mode 100644 CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c rename {CryptoPkg/Library/IntrinsicLib =3D> MdePkg/Library/CompilerIntrins= icsLib}/Ia32/MathFtol.c (100%) rename {CryptoPkg/Library/IntrinsicLib =3D> MdePkg/Library/CompilerIntrins= icsLib}/Ia32/MathLShiftS64.c (100%) rename {CryptoPkg/Library/IntrinsicLib =3D> MdePkg/Library/CompilerIntrins= icsLib}/Ia32/MathRShiftU64.c (100%) create mode 100644 MdePkg/Library/CompilerIntrinsicsLib/strcmp.c delete mode 100644 CryptoPkg/Library/IntrinsicLib/BaseIntrinsicLib.uni rename {CryptoPkg/Library/IntrinsicLib =3D> MdePkg/Library/CompilerIntrins= icsLib}/Ia32/MathLShiftS64.nasm (100%) rename {CryptoPkg/Library/IntrinsicLib =3D> MdePkg/Library/CompilerIntrins= icsLib}/Ia32/MathLlmul.asm (100%) rename {CryptoPkg/Library/IntrinsicLib =3D> MdePkg/Library/CompilerIntrins= icsLib}/Ia32/MathLlshr.asm (100%) rename {CryptoPkg/Library/IntrinsicLib =3D> MdePkg/Library/CompilerIntrins= icsLib}/Ia32/MathRShiftU64.nasm (100%) diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc index 4b5687927ae8..cc960cf103d2 100644 --- a/ArmVirtPkg/ArmVirt.dsc.inc +++ b/ArmVirtPkg/ArmVirt.dsc.inc @@ -153,7 +153,7 @@ [LibraryClasses.common] # # CryptoPkg libraries needed by multiple firmware features # - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf !if $(NETWORK_TLS_ENABLE) =3D=3D TRUE OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf !else diff --git a/CryptoPkg/CryptoPkg.dsc b/CryptoPkg/CryptoPkg.dsc index 71679687a8b1..4db8de2e5de8 100644 --- a/CryptoPkg/CryptoPkg.dsc +++ b/CryptoPkg/CryptoPkg.dsc @@ -103,7 +103,7 @@ [LibraryClasses] UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/U= efiRuntimeServicesTableLib.inf #??? IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf = #??? OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf =20 [LibraryClasses.ARM] @@ -240,7 +240,6 @@ [Components] CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf - CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf CryptoPkg/Library/TlsLib/TlsLib.inf CryptoPkg/Library/TlsLibNull/TlsLibNull.inf CryptoPkg/Library/OpensslLib/OpensslLib.inf diff --git a/EmulatorPkg/EmulatorPkg.dsc b/EmulatorPkg/EmulatorPkg.dsc index 4cf886b9eac7..e460e925a988 100644 --- a/EmulatorPkg/EmulatorPkg.dsc +++ b/EmulatorPkg/EmulatorPkg.dsc @@ -129,7 +129,7 @@ [LibraryClasses] =20 !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE RngLib|MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf PlatformSecureLib|SecurityPkg/Library/PlatformSecureLibNull/PlatformSecu= reLibNull.inf AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf diff --git a/FmpDevicePkg/FmpDevicePkg.dsc b/FmpDevicePkg/FmpDevicePkg.dsc index 258b5ce0cded..f314548d4066 100644 --- a/FmpDevicePkg/FmpDevicePkg.dsc +++ b/FmpDevicePkg/FmpDevicePkg.dsc @@ -57,7 +57,7 @@ [LibraryClasses] !ifdef CONTINUOUS_INTEGRATION BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf !else - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf RngLib|MdePkg/Library/BaseRngLibNull/BaseRngLibNull.inf diff --git a/NetworkPkg/NetworkPkg.dsc b/NetworkPkg/NetworkPkg.dsc index f69eb3d1d5c2..95dedad392fb 100644 --- a/NetworkPkg/NetworkPkg.dsc +++ b/NetworkPkg/NetworkPkg.dsc @@ -53,7 +53,7 @@ [LibraryClasses] !else BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf !endif DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD= ebugPrintErrorLevelLib.inf diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc index fc1fdb2e2297..c0bcc14c6ee6 100644 --- a/OvmfPkg/AmdSev/AmdSevX64.dsc +++ b/OvmfPkg/AmdSev/AmdSevX64.dsc @@ -188,7 +188,7 @@ [LibraryClasses] LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD= ebugPrintErrorLevelLib.inf =20 - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf RngLib|MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf =20 diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc index f0166e136cd1..e7b38222ebd6 100644 --- a/OvmfPkg/Bhyve/BhyveX64.dsc +++ b/OvmfPkg/Bhyve/BhyveX64.dsc @@ -187,7 +187,7 @@ [LibraryClasses] IoApicLib|PcAtChipsetPkg/Library/BaseIoApicLib/BaseIoApicLib.inf DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD= ebugPrintErrorLevelLib.inf =20 - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf !if $(NETWORK_TLS_ENABLE) =3D=3D TRUE OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf !else diff --git a/OvmfPkg/CloudHv/CloudHvX64.dsc b/OvmfPkg/CloudHv/CloudHvX64.dsc index 92664f319be2..f1d1a1e946b2 100644 --- a/OvmfPkg/CloudHv/CloudHvX64.dsc +++ b/OvmfPkg/CloudHv/CloudHvX64.dsc @@ -198,7 +198,7 @@ [LibraryClasses] LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD= ebugPrintErrorLevelLib.inf =20 - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf !if $(NETWORK_TLS_ENABLE) =3D=3D TRUE OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf !else diff --git a/OvmfPkg/IntelTdx/IntelTdxX64.dsc b/OvmfPkg/IntelTdx/IntelTdxX6= 4.dsc index dd8d446f4a56..daeb7cb27cbe 100644 --- a/OvmfPkg/IntelTdx/IntelTdxX64.dsc +++ b/OvmfPkg/IntelTdx/IntelTdxX64.dsc @@ -175,7 +175,7 @@ [LibraryClasses] LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD= ebugPrintErrorLevelLib.inf =20 - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf RngLib|MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf =20 diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.dsc index f8fc977cb205..edaec5995f0e 100644 --- a/OvmfPkg/Microvm/MicrovmX64.dsc +++ b/OvmfPkg/Microvm/MicrovmX64.dsc @@ -195,7 +195,7 @@ [LibraryClasses] LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD= ebugPrintErrorLevelLib.inf =20 - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf !if $(NETWORK_TLS_ENABLE) =3D=3D TRUE OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf !else diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index a9841cbfc3ca..0abcbf2c2143 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -195,7 +195,7 @@ [LibraryClasses] LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD= ebugPrintErrorLevelLib.inf =20 - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf !if $(NETWORK_TLS_ENABLE) =3D=3D TRUE OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf !else diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index f7949780fa38..8c072eac5d4c 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -199,7 +199,7 @@ [LibraryClasses] LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD= ebugPrintErrorLevelLib.inf =20 - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf !if $(NETWORK_TLS_ENABLE) =3D=3D TRUE OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf !else diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index 1448f925b782..212bdab722d5 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -215,7 +215,7 @@ [LibraryClasses] LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD= ebugPrintErrorLevelLib.inf =20 - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf !if $(NETWORK_TLS_ENABLE) =3D=3D TRUE OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf !else diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc index 6ba4bd729ae7..ad88ede14b26 100644 --- a/OvmfPkg/OvmfXen.dsc +++ b/OvmfPkg/OvmfXen.dsc @@ -184,7 +184,7 @@ [LibraryClasses] LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD= ebugPrintErrorLevelLib.inf =20 - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf !if $(NETWORK_TLS_ENABLE) =3D=3D TRUE OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf !else diff --git a/SecurityPkg/SecurityPkg.dsc b/SecurityPkg/SecurityPkg.dsc index 2b5ef67016b8..b71b78f56ca5 100644 --- a/SecurityPkg/SecurityPkg.dsc +++ b/SecurityPkg/SecurityPkg.dsc @@ -101,7 +101,7 @@ [LibraryClasses.common.PEIM] !ifdef CONTINUOUS_INTEGRATION BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf !else - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf !endif @@ -119,7 +119,7 @@ [LibraryClasses.common.DXE_DRIVER] !ifdef CONTINUOUS_INTEGRATION BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf !else - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf !endif @@ -140,7 +140,7 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER] !ifdef CONTINUOUS_INTEGRATION BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf !else - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf !endif @@ -152,7 +152,7 @@ [LibraryClasses.common.UEFI_DRIVER, LibraryClasses.comm= on.UEFI_APPLICATION] !ifdef CONTINUOUS_INTEGRATION BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf !else - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf !endif @@ -171,7 +171,7 @@ [LibraryClasses.common.DXE_SMM_DRIVER] !ifdef CONTINUOUS_INTEGRATION BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf !else - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf !endif diff --git a/SignedCapsulePkg/SignedCapsulePkg.dsc b/SignedCapsulePkg/Signe= dCapsulePkg.dsc index 72b533cd04e8..213e165be5d0 100644 --- a/SignedCapsulePkg/SignedCapsulePkg.dsc +++ b/SignedCapsulePkg/SignedCapsulePkg.dsc @@ -126,7 +126,7 @@ [LibraryClasses.common.PEIM] !ifdef CONTINUOUS_INTEGRATION BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf !else - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf !endif @@ -141,7 +141,7 @@ [LibraryClasses.common.DXE_DRIVER] !ifdef CONTINUOUS_INTEGRATION BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf !else - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf !endif @@ -155,7 +155,7 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER] !ifdef CONTINUOUS_INTEGRATION BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf !else - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf !endif @@ -178,7 +178,7 @@ [LibraryClasses.common.DXE_SMM_DRIVER] !ifdef CONTINUOUS_INTEGRATION BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf !else - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf !endif @@ -190,7 +190,7 @@ [LibraryClasses.common.UEFI_DRIVER] !ifdef CONTINUOUS_INTEGRATION BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf !else - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf !endif @@ -202,7 +202,7 @@ [LibraryClasses.common.UEFI_APPLICATION] !ifdef CONTINUOUS_INTEGRATION BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf !else - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf !endif diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayload= Pkg.dsc index 4d9bbc80c866..3f20d691fc6e 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.dsc +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc @@ -182,7 +182,7 @@ [LibraryClasses] DxeHobListLib|UefiPayloadPkg/Library/DxeHobListLib/DxeHobListLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + IntrinsicLib|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.= inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf HobLib|UefiPayloadPkg/Library/DxeHobLib/DxeHobLib.inf diff --git a/CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf b/CryptoPkg/Li= brary/IntrinsicLib/IntrinsicLib.inf deleted file mode 100644 index 86e74b57b109..000000000000 --- a/CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf +++ /dev/null @@ -1,69 +0,0 @@ -## @file -# Intrinsic Routines Wrapper Library Instance. -# -# Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.
-# SPDX-License-Identifier: BSD-2-Clause-Patent -# -## - -[Defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D BaseIntrinsicLib - MODULE_UNI_FILE =3D BaseIntrinsicLib.uni - FILE_GUID =3D 63850097-3E97-4c4f-A52D-C811A0106105 - MODULE_TYPE =3D BASE - VERSION_STRING =3D 1.0 - LIBRARY_CLASS =3D IntrinsicLib - -# -# The following information is for reference only and not required by the = build tools. -# -# VALID_ARCHITECTURES =3D IA32 X64 -# - -[Sources] - MemoryIntrinsics.c - -[Sources.IA32] - CopyMem.c - - Ia32/MathLShiftS64.c | MSFT - Ia32/MathRShiftU64.c | MSFT - Ia32/MathFtol.c | MSFT - Ia32/MathLlmul.asm | MSFT - Ia32/MathLlshr.asm | MSFT - - Ia32/MathLShiftS64.c | INTEL - Ia32/MathRShiftU64.c | INTEL - Ia32/MathFtol.c | INTEL - - Ia32/MathLShiftS64.nasm | GCC - Ia32/MathRShiftU64.nasm | GCC - -[Sources.X64] - CopyMem.c - -[Packages] - MdePkg/MdePkg.dec - -[LibraryClasses] - BaseLib - BaseMemoryLib - -[BuildOptions] - # - # Override MSFT build option to remove /Oi and /GL - # - MSFT:DEBUG_VS2003_IA32_CC_FLAGS =3D=3D /nologo /c /WX /W4 /Gs327= 68 /Gy /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF /GX- /Zi /Gm - MSFT:RELEASE_VS2003_IA32_CC_FLAGS =3D=3D /nologo /c /WX /W4 /Gs327= 68 /Gy /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF /GX- - MSFT:DEBUG_VS2003xASL_IA32_CC_FLAGS =3D=3D /nologo /c /WX /W4 /Gs327= 68 /Gy /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF /GX- /Zi /Gm - MSFT:RELEASE_VS2003xASL_IA32_CC_FLAGS =3D=3D /nologo /c /WX /W4 /Gs327= 68 /Gy /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF /GX- - MSFT:DEBUG_DDK3790_IA32_CC_FLAGS =3D=3D /nologo /c /WX /Gy /Gs327= 68 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm - MSFT:RELEASE_DDK3790_IA32_CC_FLAGS =3D=3D /nologo /c /WX /Gy /Gs327= 68 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF - MSFT:DEBUG_DDK3790xASL_IA32_CC_FLAGS =3D=3D /nologo /c /WX /Gy /Gs327= 68 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm - MSFT:RELEASE_DDK3790xASL_IA32_CC_FLAGS =3D=3D /nologo /c /WX /Gy /Gs327= 68 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF - MSFT:DEBUG_*_IA32_CC_FLAGS =3D=3D /nologo /c /WX /GS- /W4 /= Gs32768 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm - MSFT:RELEASE_*_IA32_CC_FLAGS =3D=3D /nologo /c /WX /GS- /W4 /= Gs32768 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF - MSFT:DEBUG_*_X64_CC_FLAGS =3D=3D /nologo /c /WX /GS- /X /W= 4 /Gs32768 /D UNICODE /O1b2s /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm - MSFT:RELEASE_*_X64_CC_FLAGS =3D=3D /nologo /c /WX /GS- /X /W= 4 /Gs32768 /D UNICODE /O1b2s /Gy /FIAutoGen.h /EHs-c- /GR- /GF - INTEL:*_*_*_CC_FLAGS =3D /Oi- diff --git a/MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf= b/MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf index a1559fc40ce9..7267d0e3154d 100644 --- a/MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf +++ b/MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf @@ -26,6 +26,8 @@ [Sources] memcmp_ms.c | MSFT memmove_ms.c | MSFT =20 + strcmp.c + [Sources.ARM] Arm/ashrdi3.S | GCC Arm/ashldi3.S | GCC @@ -67,6 +69,20 @@ [Sources.ARM] [Sources.AARCH64] AArch64/Atomics.S | GCC =20 +[Sources.IA32] + Ia32/MathLShiftS64.c | MSFT + Ia32/MathRShiftU64.c | MSFT + Ia32/MathFtol.c | MSFT + Ia32/MathLlmul.asm | MSFT + Ia32/MathLlshr.asm | MSFT + + Ia32/MathLShiftS64.c | INTEL + Ia32/MathRShiftU64.c | INTEL + Ia32/MathFtol.c | INTEL + + Ia32/MathLShiftS64.nasm | GCC + Ia32/MathRShiftU64.nasm | GCC + [Packages] MdePkg/MdePkg.dec =20 diff --git a/CryptoPkg/Library/IntrinsicLib/CopyMem.c b/CryptoPkg/Library/I= ntrinsicLib/CopyMem.c deleted file mode 100644 index 14a213d1dadf..000000000000 --- a/CryptoPkg/Library/IntrinsicLib/CopyMem.c +++ /dev/null @@ -1,47 +0,0 @@ -/** @file - Intrinsic Memory Routines Wrapper Implementation for OpenSSL-based - Cryptographic Library. - -Copyright (c) 2010, Intel Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include -#include - -#if defined (__clang__) && !defined (__APPLE__) - -/* Copies bytes between buffers */ -static __attribute__ ((__used__)) -void * -__memcpy ( - void *dest, - const void *src, - unsigned int count - ) -{ - return CopyMem (dest, src, (UINTN)count); -} - -__attribute__ ((__alias__ ("__memcpy"))) -void * -memcpy ( - void *dest, - const void *src, - unsigned int count - ); - -#else -/* Copies bytes between buffers */ -void * -memcpy ( - void *dest, - const void *src, - unsigned int count - ) -{ - return CopyMem (dest, src, (UINTN)count); -} - -#endif diff --git a/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c b/CryptoPkg/= Library/IntrinsicLib/MemoryIntrinsics.c deleted file mode 100644 index 611e9fd773b0..000000000000 --- a/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c +++ /dev/null @@ -1,74 +0,0 @@ -/** @file - Intrinsic Memory Routines Wrapper Implementation for OpenSSL-based - Cryptographic Library. - -Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include -#include -#include - -typedef UINTN size_t; - -#if defined (__GNUC__) || defined (__clang__) -#define GLOBAL_USED __attribute__((used)) -#else -#define GLOBAL_USED -#endif - -/* OpenSSL will use floating point support, and C compiler produces the _f= ltused - symbol by default. Simply define this symbol here to satisfy the linker= . */ -int GLOBAL_USED _fltused =3D 1; - -/* Sets buffers to a specified character */ -void * -memset ( - void *dest, - int ch, - size_t count - ) -{ - // - // NOTE: Here we use one base implementation for memset, instead of the = direct - // optimized SetMem() wrapper. Because the IntrinsicLib has to be = built - // without whole program optimization option, and there will be so= me - // potential register usage errors when calling other optimized co= des. - // - - // - // Declare the local variables that actually move the data elements as - // volatile to prevent the optimizer from replacing this function with - // the intrinsic memset() - // - volatile UINT8 *Pointer; - - Pointer =3D (UINT8 *)dest; - while (count-- !=3D 0) { - *(Pointer++) =3D (UINT8)ch; - } - - return dest; -} - -/* Compare bytes in two buffers. */ -int -memcmp ( - const void *buf1, - const void *buf2, - size_t count - ) -{ - return (int)CompareMem (buf1, buf2, count); -} - -int -strcmp ( - const char *s1, - const char *s2 - ) -{ - return (int)AsciiStrCmp (s1, s2); -} diff --git a/CryptoPkg/Library/IntrinsicLib/Ia32/MathFtol.c b/MdePkg/Librar= y/CompilerIntrinsicsLib/Ia32/MathFtol.c similarity index 100% rename from CryptoPkg/Library/IntrinsicLib/Ia32/MathFtol.c rename to MdePkg/Library/CompilerIntrinsicsLib/Ia32/MathFtol.c diff --git a/CryptoPkg/Library/IntrinsicLib/Ia32/MathLShiftS64.c b/MdePkg/L= ibrary/CompilerIntrinsicsLib/Ia32/MathLShiftS64.c similarity index 100% rename from CryptoPkg/Library/IntrinsicLib/Ia32/MathLShiftS64.c rename to MdePkg/Library/CompilerIntrinsicsLib/Ia32/MathLShiftS64.c diff --git a/CryptoPkg/Library/IntrinsicLib/Ia32/MathRShiftU64.c b/MdePkg/L= ibrary/CompilerIntrinsicsLib/Ia32/MathRShiftU64.c similarity index 100% rename from CryptoPkg/Library/IntrinsicLib/Ia32/MathRShiftU64.c rename to MdePkg/Library/CompilerIntrinsicsLib/Ia32/MathRShiftU64.c diff --git a/MdePkg/Library/CompilerIntrinsicsLib/strcmp.c b/MdePkg/Library= /CompilerIntrinsicsLib/strcmp.c new file mode 100644 index 000000000000..937b19a3dff7 --- /dev/null +++ b/MdePkg/Library/CompilerIntrinsicsLib/strcmp.c @@ -0,0 +1,33 @@ +/** @file + Intrinsic Memory Routines Wrapper Implementation for OpenSSL-based + Cryptographic Library. + +Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include +#include + +typedef UINTN size_t; + +#if defined (__GNUC__) || defined (__clang__) +#define GLOBAL_USED __attribute__((used)) +#else +#define GLOBAL_USED +#endif + +/* OpenSSL will use floating point support, and C compiler produces the _f= ltused + symbol by default. Simply define this symbol here to satisfy the linker= . */ +int GLOBAL_USED _fltused =3D 1; + +int +strcmp ( + const char *s1, + const char *s2 + ) +{ + return (int)AsciiStrCmp (s1, s2); +} diff --git a/CryptoPkg/Library/IntrinsicLib/BaseIntrinsicLib.uni b/CryptoPk= g/Library/IntrinsicLib/BaseIntrinsicLib.uni deleted file mode 100644 index 47f19d4080f7..000000000000 --- a/CryptoPkg/Library/IntrinsicLib/BaseIntrinsicLib.uni +++ /dev/null @@ -1,16 +0,0 @@ -// /** @file -// Intrinsic Routines Wrapper Library Instance. -// -// This module is intrinsic routines wrapper library instance. -// -// Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
-// -// SPDX-License-Identifier: BSD-2-Clause-Patent -// -// **/ - - -#string STR_MODULE_ABSTRACT #language en-US "Intrinsic Routine= s Wrapper Library Instance" - -#string STR_MODULE_DESCRIPTION #language en-US "This module is in= trinsic routines wrapper library instance." - diff --git a/CryptoPkg/Library/IntrinsicLib/Ia32/MathLShiftS64.nasm b/MdePk= g/Library/CompilerIntrinsicsLib/Ia32/MathLShiftS64.nasm similarity index 100% rename from CryptoPkg/Library/IntrinsicLib/Ia32/MathLShiftS64.nasm rename to MdePkg/Library/CompilerIntrinsicsLib/Ia32/MathLShiftS64.nasm diff --git a/CryptoPkg/Library/IntrinsicLib/Ia32/MathLlmul.asm b/MdePkg/Lib= rary/CompilerIntrinsicsLib/Ia32/MathLlmul.asm similarity index 100% rename from CryptoPkg/Library/IntrinsicLib/Ia32/MathLlmul.asm rename to MdePkg/Library/CompilerIntrinsicsLib/Ia32/MathLlmul.asm diff --git a/CryptoPkg/Library/IntrinsicLib/Ia32/MathLlshr.asm b/MdePkg/Lib= rary/CompilerIntrinsicsLib/Ia32/MathLlshr.asm similarity index 100% rename from CryptoPkg/Library/IntrinsicLib/Ia32/MathLlshr.asm rename to MdePkg/Library/CompilerIntrinsicsLib/Ia32/MathLlshr.asm diff --git a/CryptoPkg/Library/IntrinsicLib/Ia32/MathRShiftU64.nasm b/MdePk= g/Library/CompilerIntrinsicsLib/Ia32/MathRShiftU64.nasm similarity index 100% rename from CryptoPkg/Library/IntrinsicLib/Ia32/MathRShiftU64.nasm rename to MdePkg/Library/CompilerIntrinsicsLib/Ia32/MathRShiftU64.nasm --=20 2.36.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 (#90187): https://edk2.groups.io/g/devel/message/90187 Mute This Topic: https://groups.io/mt/91519713/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 16 16:08:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+90185+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90185+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654259215; cv=none; d=zohomail.com; s=zohoarc; b=TdMdt30IR6ndld1xFy9sxeRUf+6DFkzdp3DpOPgdEm1d7hgiAekoUs+2aMrEyeDYJdvqbxu67jOSHHDBI3HFTyghy9/NqxpqgXeC57yGoCTQYZkG4jyxBSdu78M9RRj8DouJzcqeQP5Yk5mxRjNetN58LQhiDaE1UqcE+yeJNfU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654259215; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=PCYdBrUXpeDbSLUvr8tQHq7OWMAHEWzK3xQ5rNBRRbM=; b=fmu0eYKHL4nxbpONQOO2i8Z9Rg08yumqC8pk6Gypcg9zqs0x2CiuzdfSOw7nNq1ZRtA/6XSfwYNcU7fjcN9QgCFgk3gnrQbumhjK6RSEQxxtIPM/hvFB1umB/TBLsEmT//63L6c91eJ3TPys2rLt6w6NRCZyDRfqjSxtYnG2dVY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90185+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1654259215391556.3691211131652; Fri, 3 Jun 2022 05:26:55 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id UTszYY1788612xvBq7ZLZUJ9; Fri, 03 Jun 2022 05:26:55 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web12.6656.1654259212587889778 for ; Fri, 03 Jun 2022 05:26:53 -0700 X-Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-553-IUMidNcaPWa9ilUb0-D0rQ-1; Fri, 03 Jun 2022 08:26:48 -0400 X-MC-Unique: IUMidNcaPWa9ilUb0-D0rQ-1 X-Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A5E5B1C006C2; Fri, 3 Jun 2022 12:26:46 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E02532026D07; Fri, 3 Jun 2022 12:26:45 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0F78718009D4; Fri, 3 Jun 2022 14:26:39 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Jian J Wang , Jiaxin Wu , Sean Brogan , Anthony Perard , Leif Lindholm , Zhiguang Liu , Xiaoyu Lu , Pawel Polawski , Sami Mujawar , Maciej Rabeda , Bob Feng , Jiewen Yao , Andrew Fish , Bret Barkelew , Alexei Fedorov , Guo Dong , Gerd Hoffmann , kilian_kegel@hotmail.com, Maurice Ma , Siyuan Fu , Abner Chang , Zhichao Gao , Wei6 Xu , Supreeth Venkatesh , Julien Grall , Daniel Schaefer , Ard Biesheuvel , Guomin Jiang , Jordan Justen , Oliver Steffen , Sebastien Boeuf , Benjamin You , Min Xu , Ray Ni , Rebecca Cran , Nickle Wang , Michael D Kinney , Tom Lendacky , Sami Mujawar , Peter Grehan , Erdem Aktas , Brijesh Singh , James Bottomley , Yuwei Chen , Liming Gao Subject: [edk2-devel] [PATCH v4 5/9] MdePkg/CompilerIntrinsicsLib: copy over intrinsics from edk2-libc repo Date: Fri, 3 Jun 2022 14:26:34 +0200 Message-Id: <20220603122638.1547060-6-kraxel@redhat.com> In-Reply-To: <20220603122638.1547060-1-kraxel@redhat.com> References: <20220603122638.1547060-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: 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,kraxel@redhat.com X-Gm-Message-State: WUDe7AtPX6g2GA3szdr30eHtx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1654259215; bh=u4x8+bQOVJeYagAx4eiZES0Oxu/L8YqZdsenBVDiIjg=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=c2yLFtTrmzHF5Lam2ZddjFKgb0TnyGYyKElFUYUgMIQqvhlWo9DXYEHr0/MeYAIUCv5 VIwNGfvXVUoPbP93dLyp9iwqBvEh3gPYeDrHn5Y6ScIHAvkEVxDu2RthnC6W24RcnDFz4 xNtjB8BLDOh5lS9yzGiEIiy0eNnBoq8U8oY= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1654259216722100023 Content-Type: text/plain; charset="utf-8"; x-default="true" Copy over unmodified (except for running through uncrustify and adding SPDX licence tags), from https://github.com/tianocore/edk2-libc/tree/master/StdLib/LibC/CRT Signed-off-by: Gerd Hoffmann Acked-by: Liming Gao --- .../Library/CompilerIntrinsicsLib/Ia32/Gcc.c | 285 ++++++++++++++++++ .../CompilerIntrinsicsLib/Ia32/lldiv.c | 100 ++++++ .../CompilerIntrinsicsLib/Ia32/lldvrm.c | 104 +++++++ .../CompilerIntrinsicsLib/Ia32/llmul.c | 84 ++++++ .../CompilerIntrinsicsLib/Ia32/llrem.c | 97 ++++++ .../CompilerIntrinsicsLib/Ia32/llshl.c | 59 ++++ .../CompilerIntrinsicsLib/Ia32/llshr.c | 63 ++++ .../CompilerIntrinsicsLib/Ia32/ulldiv.c | 91 ++++++ .../CompilerIntrinsicsLib/Ia32/ulldvrm.c | 104 +++++++ .../CompilerIntrinsicsLib/Ia32/ullrem.c | 97 ++++++ .../CompilerIntrinsicsLib/Ia32/ullshr.c | 62 ++++ .../CompilerIntrinsicsLib/Ia32/ashrdi3.S | 68 +++++ .../CompilerIntrinsicsLib/Ia32/mulll.S | 79 +++++ .../CompilerIntrinsicsLib/Ia32/shldi3.S | 64 ++++ .../CompilerIntrinsicsLib/Ia32/udivdi3.S | 85 ++++++ .../CompilerIntrinsicsLib/Ia32/umoddi3.S | 91 ++++++ 16 files changed, 1533 insertions(+) create mode 100644 MdePkg/Library/CompilerIntrinsicsLib/Ia32/Gcc.c create mode 100644 MdePkg/Library/CompilerIntrinsicsLib/Ia32/lldiv.c create mode 100644 MdePkg/Library/CompilerIntrinsicsLib/Ia32/lldvrm.c create mode 100644 MdePkg/Library/CompilerIntrinsicsLib/Ia32/llmul.c create mode 100644 MdePkg/Library/CompilerIntrinsicsLib/Ia32/llrem.c create mode 100644 MdePkg/Library/CompilerIntrinsicsLib/Ia32/llshl.c create mode 100644 MdePkg/Library/CompilerIntrinsicsLib/Ia32/llshr.c create mode 100644 MdePkg/Library/CompilerIntrinsicsLib/Ia32/ulldiv.c create mode 100644 MdePkg/Library/CompilerIntrinsicsLib/Ia32/ulldvrm.c create mode 100644 MdePkg/Library/CompilerIntrinsicsLib/Ia32/ullrem.c create mode 100644 MdePkg/Library/CompilerIntrinsicsLib/Ia32/ullshr.c create mode 100644 MdePkg/Library/CompilerIntrinsicsLib/Ia32/ashrdi3.S create mode 100644 MdePkg/Library/CompilerIntrinsicsLib/Ia32/mulll.S create mode 100644 MdePkg/Library/CompilerIntrinsicsLib/Ia32/shldi3.S create mode 100644 MdePkg/Library/CompilerIntrinsicsLib/Ia32/udivdi3.S create mode 100644 MdePkg/Library/CompilerIntrinsicsLib/Ia32/umoddi3.S diff --git a/MdePkg/Library/CompilerIntrinsicsLib/Ia32/Gcc.c b/MdePkg/Libra= ry/CompilerIntrinsicsLib/Ia32/Gcc.c new file mode 100644 index 000000000000..bb211022c0e4 --- /dev/null +++ b/MdePkg/Library/CompilerIntrinsicsLib/Ia32/Gcc.c @@ -0,0 +1,285 @@ +/** @file + Integer Arithmetic Run-time support functions for GCC. + The integer arithmetic routines are used on platforms that don't provide + hardware support for arithmetic operations on some modes.. + + Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license. + +SPDX-License-Identifier: BSD-2-Clause-Patent + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ +#include +#include +#include + +#include + +// Shift Datum left by Count bits. +// =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D +int +__ashlsi3 ( + int Datum, + int Count + ) +{ + DEBUG ((DEBUG_INFO, "%a:\n", __func__)); + return (int)LShiftU64 ((UINT64)Datum, (UINTN)Count); +} + +long +__ashldi3 ( + long Datum, + int Count + ) +{ + DEBUG ((DEBUG_INFO, "%a:\n", __func__)); + return (long)LShiftU64 ((UINT64)Datum, (UINTN)Count); +} + +long long +__ashlti3 ( + long long Datum, + int Count + ) +{ + DEBUG ((DEBUG_INFO, "%a:\n", __func__)); + return (long long)LShiftU64 ((UINT64)Datum, (UINTN)Count); +} + +// Arithmetically shift Datum right by Count bits. +// =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D +int +__ashrsi3 ( + int Datum, + int Count + ) +{ + DEBUG ((DEBUG_INFO, "%a:\n", __func__)); + return (int)ARShiftU64 ((UINT64)Datum, (UINTN)Count); +} + +long +__ashrdi3 ( + long Datum, + int Count + ) +{ + DEBUG ((DEBUG_INFO, "%a:\n", __func__)); + return (long)ARShiftU64 ((UINT64)Datum, (UINTN)Count); +} + +long long +__ashrti3 ( + long long Datum, + int Count + ) +{ + DEBUG ((DEBUG_INFO, "%a:\n", __func__)); + return (long long)ARShiftU64 ((UINT64)Datum, (UINTN)Count); +} + +// Return the quotient of the signed division of Dividend and Divisor +// =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D +int +__divsi3 ( + int Dividend, + int Divisor + ) +{ + DEBUG ((DEBUG_INFO, "%a:\n", __func__)); + return (int)DivS64x64Remainder ((INT64)Dividend, (INT64)Divisor, NULL); +} + +INT64 +__divdi3 ( + INT64 Dividend, + INT64 Divisor + ) +{ + INT64 Quotient; + + Quotient =3D DivS64x64Remainder ((INT64)Dividend, (INT64)Divisor, NULL); + DEBUG ((DEBUG_INFO, "%a: %Ld / %Ld =3D %Ld\n", __func__, Dividend, Divis= or, Quotient)); + + return Quotient; +} + +long long +__divti3 ( + long long Dividend, + long long Divisor + ) +{ + DEBUG ((DEBUG_INFO, "%a:\n", __func__)); + return (long long)DivS64x64Remainder ((INT64)Dividend, (INT64)Divisor, N= ULL); +} + +// Logically shift Datum right by Count bits +// =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D +int +__lshrsi3 ( + int Datum, + int Count + ) +{ + DEBUG ((DEBUG_INFO, "%a:\n", __func__)); + return (int)RShiftU64 ((UINT64)Datum, (UINTN)Count); +} + +long +__lshrdi3 ( + int Datum, + int Count + ) +{ + DEBUG ((DEBUG_INFO, "%a:\n", __func__)); + return (long)RShiftU64 ((UINT64)Datum, (UINTN)Count); +} + +long long +__lshrti3 ( + int Datum, + int Count + ) +{ + DEBUG ((DEBUG_INFO, "%a:\n", __func__)); + return (long long)RShiftU64 ((UINT64)Datum, (UINTN)Count); +} + +// Return the remainder of the signed division of Dividend and Divisor +// =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D +int +__modsi3 ( + int Dividend, + int Divisor + ) +{ + INT64 Remainder; + + (void)DivS64x64Remainder ((INT64)Dividend, (INT64)Divisor, &Remainder); + DEBUG ((DEBUG_INFO, "modsi3: %d %% %d =3D %d\n", Dividend, Divisor, (int= )Remainder)); + + return (int)Remainder; +} + +INT64 +__moddi3 ( + INT64 Dividend, + INT64 Divisor + ) +{ + INT64 Remainder; + + (void)DivS64x64Remainder ((INT64)Dividend, (INT64)Divisor, &Remainder); + DEBUG ((DEBUG_INFO, "moddi3: %Ld %% %Ld =3D %Ld\n", (INT64)Dividend, (IN= T64)Divisor, Remainder)); + + return Remainder; +} + +long long +__modti3 ( + long long Dividend, + long long Divisor + ) +{ + INT64 Remainder; + + (void)DivS64x64Remainder ((INT64)Dividend, (INT64)Divisor, &Remainder); + DEBUG ((DEBUG_INFO, "modti3: %Ld %% %Ld =3D %Ld\n", (INT64)Dividend, (IN= T64)Divisor, Remainder)); + + return (long long)Remainder; +} + +// These functions return the product of the Multiplicand and Multiplier. +// =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D +long long +__multi3 ( + long long Multiplicand, + long long Multiplier + ) +{ + DEBUG ((DEBUG_INFO, "%a:\n", __func__)); + return (long long)MultS64x64 ((INT64)Multiplicand, (INT64)Multiplier); +} + +// Return the quotient of the unsigned division of a and b. +// =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D +unsigned int +__udivsi3 ( + unsigned int Dividend, + unsigned int Divisor + ) +{ + DEBUG ((DEBUG_INFO, "%a:\n", __func__)); + return (int)DivU64x64Remainder ((UINT64)Dividend, (UINT64)Divisor, NULL); +} + +unsigned long +__udivdi3 ( + unsigned long Dividend, + unsigned long Divisor + ) +{ + DEBUG ((DEBUG_INFO, "%a:\n", __func__)); + return (long)DivU64x64Remainder ((UINT64)Dividend, (UINT64)Divisor, NULL= ); +} + +unsigned long long +__udivti3 ( + unsigned long long Dividend, + unsigned long long Divisor + ) +{ + DEBUG ((DEBUG_INFO, "%a:\n", __func__)); + return (long long)DivU64x64Remainder ((UINT64)Dividend, (UINT64)Divisor,= NULL); +} + +// =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D +unsigned int +__umodsi3 ( + unsigned int Dividend, + unsigned int Divisor + ) +{ + UINT64 Remainder; + + DEBUG ((DEBUG_INFO, "%a:\n", __func__)); + (void)DivU64x64Remainder ((UINT64)Dividend, (UINT64)Divisor, &Remainder); + + return (unsigned int)Remainder; +} + +unsigned long +__umoddi3 ( + unsigned long Dividend, + unsigned long Divisor + ) +{ + UINT64 Remainder; + + DEBUG ((DEBUG_INFO, "%a:\n", __func__)); + (void)DivU64x64Remainder ((UINT64)Dividend, (UINT64)Divisor, &Remainder); + + return (unsigned long)Remainder; +} + +unsigned long long +__umodti3 ( + unsigned long long Dividend, + unsigned long long Divisor + ) +{ + UINT64 Remainder; + + DEBUG ((DEBUG_INFO, "%a:\n", __func__)); + (void)DivU64x64Remainder ((UINT64)Dividend, (UINT64)Divisor, &Remainder); + + return (unsigned long long)Remainder; +} diff --git a/MdePkg/Library/CompilerIntrinsicsLib/Ia32/lldiv.c b/MdePkg/Lib= rary/CompilerIntrinsicsLib/Ia32/lldiv.c new file mode 100644 index 000000000000..cf2eec2a70b4 --- /dev/null +++ b/MdePkg/Library/CompilerIntrinsicsLib/Ia32/lldiv.c @@ -0,0 +1,100 @@ +/** @file + 64-bit Math Worker Function. + The 32-bit versions of C compiler generate calls to library routines + to handle 64-bit math. These functions use non-standard calling conventi= ons. + + Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + +SPDX-License-Identifier: BSD-2-Clause-Patent + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ + +#include + +/* + * Divides a 64-bit signed value with a 64-bit signed value and returns + * a 64-bit signed result. + */ +__declspec(naked) void __cdecl +_alldiv ( + void + ) +{ + // + // Wrapper Implementation over EDKII DivS64x64Remainder() routine + // INT64 + // EFIAPI + // DivS64x64Remainder ( + // IN UINT64 Dividend, + // IN UINT64 Divisor, + // OUT UINT64 *Remainder OPTIONAL + // ) + // + _asm { + ;Entry: + ; Arguments are passed on the stack: + ; 1st pushed: divisor (QWORD) + ; 2nd pushed: dividend (QWORD) + ; + ;Exit: + ; EDX:EAX contains the quotient (dividend/ divisor) + ; NOTE: this routine removes the parameters from the stack. + ; + ; Original local stack when calling _alldiv + ; ----------------- + ; | | + ; |---------------| + ; | | + ; |-- Divisor --| + ; | | + ; |---------------| + ; | | + ; |-- Dividend --| + ; | | + ; |---------------| + ; | ReturnAddr** | + ; ESP---->|---------------| + ; + + ; + ; Set up the local stack for NULL Reminder pointer + ; + xor eax, eax + push eax + + ; + ; Set up the local stack for Divisor parameter + ; + mov eax, [esp + 20] + push eax + mov eax, [esp + 20] + push eax + + ; + ; Set up the local stack for Dividend parameter + ; + mov eax, [esp + 20] + push eax + mov eax, [esp + 20] + push eax + + ; + ; Call native DivS64x64Remainder of BaseLib + ; + call DivS64x64Remainder + + ; + ; Adjust stack + ; + add esp, 20 + + ret 16 + } +} diff --git a/MdePkg/Library/CompilerIntrinsicsLib/Ia32/lldvrm.c b/MdePkg/Li= brary/CompilerIntrinsicsLib/Ia32/lldvrm.c new file mode 100644 index 000000000000..1fbe11bea751 --- /dev/null +++ b/MdePkg/Library/CompilerIntrinsicsLib/Ia32/lldvrm.c @@ -0,0 +1,104 @@ +/** @file + 64-bit Math Worker Function. + The 32-bit versions of C compiler generate calls to library routines + to handle 64-bit math. These functions use non-standard calling conventi= ons. + + Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + +SPDX-License-Identifier: BSD-2-Clause-Patent + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ + +#include + +/* + * Divides a 64-bit signed value by another 64-bit signed value and returns + * the 64-bit signed result and the 64-bit signed remainder. + */ +__declspec(naked) void __cdecl +_alldvrm ( + void + ) +{ + // + // Wrapper Implementation over EDKII DivS64x64Remainder() routine + // INT64 + // EFIAPI + // DivS64x64Remainder ( + // IN INT64 Dividend, + // IN INT64 Divisor, + // OUT INT64 *Remainder + // ) + // + _asm { + ; Original local stack when calling _alldvrm + ; ----------------- + ; | | + ; |---------------| + ; | | + ; |-- Divisor --| + ; | | + ; |---------------| + ; | | + ; |-- Dividend --| + ; | | + ; |---------------| + ; | ReturnAddr** | + ; ESP---->|---------------| + ; + ; + ; On Exit: + ; EDX:EAX contains the quotient (dividend/ divisor) + ; EBX:ECX contains the remainder (divided % divisor) + ; NOTE: this routine removes the parameters from the stack. + ; + + ; + ; Set up the local stack for Reminder pointer + ; + sub esp, 8 + push esp + + ; + ; Set up the local stack for Divisor parameter + ; + mov eax, [esp + 28] + push eax + mov eax, [esp + 28] + push eax + + ; + ; Set up the local stack for Dividend parameter + ; + mov eax, [esp + 28] + push eax + mov eax, [esp + 28] + push eax + + ; + ; Call native DivS64x64Remainder of BaseLib + ; + call DivS64x64Remainder + + ; + ; EDX:EAX contains the quotient (dividend/ divisor) + ; Put the Remainder in EBX:ECX + ; + mov ecx, [esp + 20] + mov ebx, [esp + 24] + + ; + ; Adjust stack + ; + add esp, 28 + + ret 16 + } +} diff --git a/MdePkg/Library/CompilerIntrinsicsLib/Ia32/llmul.c b/MdePkg/Lib= rary/CompilerIntrinsicsLib/Ia32/llmul.c new file mode 100644 index 000000000000..3f9c54454128 --- /dev/null +++ b/MdePkg/Library/CompilerIntrinsicsLib/Ia32/llmul.c @@ -0,0 +1,84 @@ +/** @file + 64-bit Math Worker Function. + The 32-bit versions of C compiler generate calls to library routines + to handle 64-bit math. These functions use non-standard calling conventi= ons. + + Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + +SPDX-License-Identifier: BSD-2-Clause-Patent + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ + +#include + +/* + * Multiplies a 64-bit signed or unsigned value by a 64-bit signed or unsi= gned value + * and returns a 64-bit result. + */ +__declspec(naked) void __cdecl +_allmul ( + void + ) +{ + // + // Wrapper Implementation over EDKII MultS64x64() routine + // INT64 + // EFIAPI + // MultS64x64 ( + // IN INT64 Multiplicand, + // IN INT64 Multiplier + // ) + // + _asm { + ; Original local stack when calling _allmul + ; ----------------- + ; | | + ; |---------------| + ; | | + ; |--Multiplier --| + ; | | + ; |---------------| + ; | | + ; |--Multiplicand-| + ; | | + ; |---------------| + ; | ReturnAddr** | + ; ESP---->|---------------| + ; + + ; + ; Set up the local stack for Multiplicand parameter + ; + mov eax, [esp + 16] + push eax + mov eax, [esp + 16] + push eax + + ; + ; Set up the local stack for Multiplier parameter + ; + mov eax, [esp + 16] + push eax + mov eax, [esp + 16] + push eax + + ; + ; Call native MulS64x64 of BaseLib + ; + call MultS64x64 + + ; + ; Adjust stack + ; + add esp, 16 + + ret 16 + } +} diff --git a/MdePkg/Library/CompilerIntrinsicsLib/Ia32/llrem.c b/MdePkg/Lib= rary/CompilerIntrinsicsLib/Ia32/llrem.c new file mode 100644 index 000000000000..5a73d539a650 --- /dev/null +++ b/MdePkg/Library/CompilerIntrinsicsLib/Ia32/llrem.c @@ -0,0 +1,97 @@ +/** @file + 64-bit Math Worker Function. + The 32-bit versions of C compiler generate calls to library routines + to handle 64-bit math. These functions use non-standard calling conventi= ons. + + Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + +SPDX-License-Identifier: BSD-2-Clause-Patent + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ + +#include + +/* + * Divides a 64-bit signed value by another 64-bit signed value and returns + * the 64-bit signed remainder. + */ +__declspec(naked) void __cdecl +_allrem ( + void + ) +{ + // + // Wrapper Implementation over EDKII DivS64x64Remainder() routine + // UINT64 + // EFIAPI + // DivS64x64Remainder ( + // IN UINT64 Dividend, + // IN UINT64 Divisor, + // OUT UINT64 *Remainder + // ) + // + _asm { + ; Original local stack when calling _allrem + ; ----------------- + ; | | + ; |---------------| + ; | | + ; |-- Divisor --| + ; | | + ; |---------------| + ; | | + ; |-- Dividend --| + ; | | + ; |---------------| + ; | ReturnAddr** | + ; ESP---->|---------------| + ; + + ; + ; Set up the local stack for Reminder pointer + ; + sub esp, 8 + push esp + + ; + ; Set up the local stack for Divisor parameter + ; + mov eax, [esp + 28] + push eax + mov eax, [esp + 28] + push eax + + ; + ; Set up the local stack for Dividend parameter + ; + mov eax, [esp + 28] + push eax + mov eax, [esp + 28] + push eax + + ; + ; Call native DivS64x64Remainder of BaseLib + ; + call DivS64x64Remainder + + ; + ; Put the Reminder in EDX:EAX as return value + ; + mov eax, [esp + 20] + mov edx, [esp + 24] + + ; + ; Adjust stack + ; + add esp, 28 + + ret 16 + } +} diff --git a/MdePkg/Library/CompilerIntrinsicsLib/Ia32/llshl.c b/MdePkg/Lib= rary/CompilerIntrinsicsLib/Ia32/llshl.c new file mode 100644 index 000000000000..665b628b4014 --- /dev/null +++ b/MdePkg/Library/CompilerIntrinsicsLib/Ia32/llshl.c @@ -0,0 +1,59 @@ +/** @file + 64-bit Math Worker Function. + The 32-bit versions of C compiler generate calls to library routines + to handle 64-bit math. These functions use non-standard calling conventi= ons. + + Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + +SPDX-License-Identifier: BSD-2-Clause-Patent + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ + +/* + * Shifts a 64-bit signed value left by a particular number of bits. + */ +__declspec(naked) void __cdecl +_allshl ( + void + ) +{ + _asm { + ; + ; Handle shifting of 64 or more bits (return 0) + ; + + cmp cl, 64 + jae short ReturnZero + + ; + ; Handle shifting of between 0 and 31 bits + ; + cmp cl, 32 + jae short More32 + shld edx, eax, cl + shl eax, cl + ret + + ; + ; Handle shifting of between 32 and 63 bits + ; +More32: + mov edx, eax + xor eax, eax + and cl, 31 + shl edx, cl + ret + +ReturnZero: + xor eax,eax + xor edx,edx + ret + } +} diff --git a/MdePkg/Library/CompilerIntrinsicsLib/Ia32/llshr.c b/MdePkg/Lib= rary/CompilerIntrinsicsLib/Ia32/llshr.c new file mode 100644 index 000000000000..94b91d4ea3c7 --- /dev/null +++ b/MdePkg/Library/CompilerIntrinsicsLib/Ia32/llshr.c @@ -0,0 +1,63 @@ +/** @file + 64-bit Math Worker Function. + The 32-bit versions of C compiler generate calls to library routines + to handle 64-bit math. These functions use non-standard calling conventi= ons. + + Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + +SPDX-License-Identifier: BSD-2-Clause-Patent + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ + +/* + * Shifts a 64-bit signed value right by a particular number of bits. + */ +__declspec(naked) void __cdecl +_allshr ( + void + ) +{ + _asm { + ; + ; Handle shifts of 64 bits or more (if shifting 64 bits or more, the r= esult + ; depends only on the high order bit of edx). + ; + + cmp cl,64 + jae short SIGNRETURN + + ; + ; Handle shifts of between 0 and 31 bits + ; + cmp cl, 32 + jae short MORE32 + shrd eax,edx,cl + sar edx,cl + ret + + ; + ; Handle shifts of between 32 and 63 bits + ; +MORE32: + mov eax,edx + sar edx,31 + and cl,31 + sar eax,cl + ret + + ; + ; Return double precision 0 or -1, depending on the sign of edx + ; +SIGNRETURN: + sar edx,31 + mov eax,edx + ret + } +} diff --git a/MdePkg/Library/CompilerIntrinsicsLib/Ia32/ulldiv.c b/MdePkg/Li= brary/CompilerIntrinsicsLib/Ia32/ulldiv.c new file mode 100644 index 000000000000..064e0e109b1d --- /dev/null +++ b/MdePkg/Library/CompilerIntrinsicsLib/Ia32/ulldiv.c @@ -0,0 +1,91 @@ +/** @file + 64-bit Math Worker Function. + The 32-bit versions of C compiler generate calls to library routines + to handle 64-bit math. These functions use non-standard calling conventi= ons. + + Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + +SPDX-License-Identifier: BSD-2-Clause-Patent + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ + +#include + +/* + * Divides a 64-bit unsigned value with a 64-bit unsigned value and returns + * a 64-bit unsigned result. + */ +__declspec(naked) void __cdecl +_aulldiv ( + void + ) +{ + // + // Wrapper Implementation over EDKII DivU64x64Reminder() routine + // UINT64 + // EFIAPI + // DivU64x64Remainder ( + // IN UINT64 Dividend, + // IN UINT64 Divisor, + // OUT UINT64 *Remainder OPTIONAL + // ) + // + _asm { + ; Original local stack when calling _aulldiv + ; ----------------- + ; | | + ; |---------------| + ; | | + ; |-- Divisor --| + ; | | + ; |---------------| + ; | | + ; |-- Dividend --| + ; | | + ; |---------------| + ; | ReturnAddr** | + ; ESP---->|---------------| + ; + + ; + ; Set up the local stack for NULL Reminder pointer + ; + xor eax, eax + push eax + + ; + ; Set up the local stack for Divisor parameter + ; + mov eax, [esp + 20] + push eax + mov eax, [esp + 20] + push eax + + ; + ; Set up the local stack for Dividend parameter + ; + mov eax, [esp + 20] + push eax + mov eax, [esp + 20] + push eax + + ; + ; Call native DivU64x64Remainder of BaseLib + ; + call DivU64x64Remainder + + ; + ; Adjust stack + ; + add esp, 20 + + ret 16 + } +} diff --git a/MdePkg/Library/CompilerIntrinsicsLib/Ia32/ulldvrm.c b/MdePkg/L= ibrary/CompilerIntrinsicsLib/Ia32/ulldvrm.c new file mode 100644 index 000000000000..37946b4edc94 --- /dev/null +++ b/MdePkg/Library/CompilerIntrinsicsLib/Ia32/ulldvrm.c @@ -0,0 +1,104 @@ +/** @file + 64-bit Math Worker Function. + The 32-bit versions of C compiler generate calls to library routines + to handle 64-bit math. These functions use non-standard calling conventi= ons. + + Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + +SPDX-License-Identifier: BSD-2-Clause-Patent + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ + +#include + +/* + * Divides a 64-bit signed value by another 64-bit signed value and returns + * the 64-bit signed result and the 64-bit signed remainder. + */ +__declspec(naked) void __cdecl +_aulldvrm ( + void + ) +{ + // + // Wrapper Implementation over EDKII DivU64x64Remainder() routine + // UINT64 + // EFIAPI + // DivU64x64Remainder ( + // IN UINT64 Dividend, + // IN UINT64 Divisor, + // OUT UINT64 *Remainder + // ) + // + _asm { + ; Original local stack when calling _aulldvrm + ; ----------------- + ; | | + ; |---------------| + ; | | + ; |-- Divisor --| + ; | | + ; |---------------| + ; | | + ; |-- Dividend --| + ; | | + ; |---------------| + ; | ReturnAddr** | + ; ESP---->|---------------| + ; + ; + ; On Exit: + ; EDX:EAX contains the quotient (dividend/ divisor) + ; EBX:ECX contains the remainder (divided % divisor) + ; NOTE: this routine removes the parameters from the stack. + ; + + ; + ; Set up the local stack for Remainder pointer + ; + sub esp, 8 + push esp + + ; + ; Set up the local stack for Divisor parameter + ; + mov eax, [esp + 28] + push eax + mov eax, [esp + 28] + push eax + + ; + ; Set up the local stack for Dividend parameter + ; + mov eax, [esp + 28] + push eax + mov eax, [esp + 28] + push eax + + ; + ; Call native DivU64x64Remainder of BaseLib + ; + call DivU64x64Remainder + + ; + ; EDX:EAX contains the quotient (dividend/ divisor) + ; Put the Remainder in EBX:ECX + ; + mov ecx, [esp + 20] + mov ebx, [esp + 24] + + ; + ; Adjust stack + ; + add esp, 28 + + ret 16 + } +} diff --git a/MdePkg/Library/CompilerIntrinsicsLib/Ia32/ullrem.c b/MdePkg/Li= brary/CompilerIntrinsicsLib/Ia32/ullrem.c new file mode 100644 index 000000000000..a5b65e600415 --- /dev/null +++ b/MdePkg/Library/CompilerIntrinsicsLib/Ia32/ullrem.c @@ -0,0 +1,97 @@ +/** @file + 64-bit Math Worker Function. + The 32-bit versions of C compiler generate calls to library routines + to handle 64-bit math. These functions use non-standard calling conventi= ons. + + Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + +SPDX-License-Identifier: BSD-2-Clause-Patent + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ + +#include + +/* + * Divides a 64-bit unsigned value by another 64-bit unsigned value and re= turns + * the 64-bit unsigned remainder. + */ +__declspec(naked) void __cdecl +_aullrem ( + void + ) +{ + // + // Wrapper Implementation over EDKII DivU64x64Remainder() routine + // UINT64 + // EFIAPI + // DivU64x64Remainder ( + // IN UINT64 Dividend, + // IN UINT64 Divisor, + // OUT UINT64 *Remainder OPTIONAL + // ) + // + _asm { + ; Original local stack when calling _aullrem + ; ----------------- + ; | | + ; |---------------| + ; | | + ; |-- Divisor --| + ; | | + ; |---------------| + ; | | + ; |-- Dividend --| + ; | | + ; |---------------| + ; | ReturnAddr** | + ; ESP---->|---------------| + ; + + ; + ; Set up the local stack for Reminder pointer + ; + sub esp, 8 + push esp + + ; + ; Set up the local stack for Divisor parameter + ; + mov eax, [esp + 28] + push eax + mov eax, [esp + 28] + push eax + + ; + ; Set up the local stack for Dividend parameter + ; + mov eax, [esp + 28] + push eax + mov eax, [esp + 28] + push eax + + ; + ; Call native DivU64x64Remainder of BaseLib + ; + call DivU64x64Remainder + + ; + ; Put the Reminder in EDX:EAX as return value + ; + mov eax, [esp + 20] + mov edx, [esp + 24] + + ; + ; Adjust stack + ; + add esp, 28 + + ret 16 + } +} diff --git a/MdePkg/Library/CompilerIntrinsicsLib/Ia32/ullshr.c b/MdePkg/Li= brary/CompilerIntrinsicsLib/Ia32/ullshr.c new file mode 100644 index 000000000000..1cfe781720ac --- /dev/null +++ b/MdePkg/Library/CompilerIntrinsicsLib/Ia32/ullshr.c @@ -0,0 +1,62 @@ +/** @file + 64-bit Math Worker Function. + The 32-bit versions of C compiler generate calls to library routines + to handle 64-bit math. These functions use non-standard calling conventi= ons. + + Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + +SPDX-License-Identifier: BSD-2-Clause-Patent + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ + +/* + * Shifts a 64-bit unsigned value right by a certain number of bits. + */ +__declspec(naked) void __cdecl +_aullshr ( + void + ) +{ + _asm { + ; + ; Checking: Only handle 64bit shifting or more + ; + cmp cl, 64 + jae _Exit + + ; + ; Handle shifting between 0 and 31 bits + ; + cmp cl, 32 + jae More32 + shrd eax, edx, cl + shr edx, cl + ret + + ; + ; Handle shifting of 32-63 bits + ; +More32: + mov eax, edx + xor edx, edx + and cl, 31 + shr eax, cl + ret + + ; + ; Invalid number (less then 32bits), return 0 + ; + +_Exit: + xor eax, eax + xor edx, edx + ret + } +} diff --git a/MdePkg/Library/CompilerIntrinsicsLib/Ia32/ashrdi3.S b/MdePkg/L= ibrary/CompilerIntrinsicsLib/Ia32/ashrdi3.S new file mode 100644 index 000000000000..f671d419e1f9 --- /dev/null +++ b/MdePkg/Library/CompilerIntrinsicsLib/Ia32/ashrdi3.S @@ -0,0 +1,68 @@ +#-------------------------------------------------------------------------= ----- +# +# Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+# This program and the accompanying materials are licensed and made availa= ble +# under the terms and conditions of the BSD License which accompanies this +# distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. +# +# Module Name: +# +# MathRShiftU64.S +# +# Abstract: +# +# 64-bit Math Worker Function. +# Shifts a 64-bit unsigned value right by a certain number of bits. +# +#-------------------------------------------------------------------------= ----- + + + .686: + .code: + +ASM_GLOBAL ASM_PFX(__ashrdi3) + +#-------------------------------------------------------------------------= ----- +# +# void __cdecl __ashrdi3 (void) +# +#-------------------------------------------------------------------------= ----- +ASM_PFX(__ashrdi3): + # + # Checking: Only handle 64bit shifting or more + # + cmpb $64, %cl + jae _Exit + + # + # Handle shifting between 0 and 31 bits + # + cmpb $32, %cl + jae More32 + shrd %cl, %edx, %eax + shr %cl, %edx + ret + + # + # Handle shifting of 32-63 bits + # +More32: + movl %edx, %eax + xor %edx, %edx + and $32, %cl + shr %cl, %eax + ret + + # + # Invalid number (less then 32bits), return 0 + # +_Exit: + xor %eax, %eax + xor %edx, %edx + ret diff --git a/MdePkg/Library/CompilerIntrinsicsLib/Ia32/mulll.S b/MdePkg/Lib= rary/CompilerIntrinsicsLib/Ia32/mulll.S new file mode 100644 index 000000000000..c46d4ab82311 --- /dev/null +++ b/MdePkg/Library/CompilerIntrinsicsLib/Ia32/mulll.S @@ -0,0 +1,79 @@ +#-------------------------------------------------------------------------= ----- +# +# Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+# This program and the accompanying materials are licensed and made availa= ble +# under the terms and conditions of the BSD License which accompanies this +# distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. +# +# Module Name: +# +# MathMultS64x64.S +# +# Abstract: +# +# 64-bit Math Worker Function. +# Multiplies a 64-bit signed or unsigned value by a 64-bit signed or uns= igned value +# and returns a 64-bit result +# +#-------------------------------------------------------------------------= ----- + + .686: + .code: + +ASM_GLOBAL ASM_PFX(_mulll), ASM_PFX(MultS64x64) + +#-------------------------------------------------------------------------= ----- +# +# void __cdecl __mulll (void) +# +#-------------------------------------------------------------------------= ----- +ASM_PFX(__mulll): + # Original local stack when calling __mulll + # ----------------- + # | | + # |---------------| + # | | + # |--Multiplier --| + # | | + # |---------------| + # | | + # |--Multiplicand-| + # | | + # |---------------| + # | ReturnAddr** | + # ESP---->|---------------| + # + + # + # Set up the local stack for Multiplicand parameter + # + movl 16(%esp), %eax + push %eax + movl 16(%esp), %eax + push %eax + + # + # Set up the local stack for Multiplier parameter + # + movl 16(%esp), %eax + push %eax + movl 16(%esp), %eax + push %eax + + # + # Call native MulS64x64 of BaseLib + # + jmp ASM_PFX(MultS64x64) + + # + # Adjust stack + # + add $16, %esp + + ret $16 diff --git a/MdePkg/Library/CompilerIntrinsicsLib/Ia32/shldi3.S b/MdePkg/Li= brary/CompilerIntrinsicsLib/Ia32/shldi3.S new file mode 100644 index 000000000000..4e5ce03c40e6 --- /dev/null +++ b/MdePkg/Library/CompilerIntrinsicsLib/Ia32/shldi3.S @@ -0,0 +1,64 @@ +#-------------------------------------------------------------------------= ----- +# +# Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+# This program and the accompanying materials are licensed and made availa= ble +# under the terms and conditions of the BSD License which accompanies this +# distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. +# +# Module Name: +# +# MathLShiftS64.S +# +# Abstract: +# +# 64-bit Math Worker Function. +# Shifts a 64-bit signed value left by a certain number of bits. +# +#-------------------------------------------------------------------------= ----- + + .686: + .code: + +ASM_GLOBAL ASM_PFX(__ashldi3) + +#-------------------------------------------------------------------------= ----- +# +# void __cdecl __ashldi3 (void) +# +#-------------------------------------------------------------------------= ----- +ASM_PFX(__ashldi3): + # + # Handle shifting of 64 or more bits (return 0) + # + cmpb $64, %cl + jae ReturnZero + + # + # Handle shifting of between 0 and 31 bits + # + cmpb $32, %cl + jae More32 + shld %cl, %eax, %edx + shl %cl, %eax + ret + + # + # Handle shifting of between 32 and 63 bits + # +More32: + movl %eax, %edx + xor %eax, %eax + and $31, %cl + shl %cl, %edx + ret + +ReturnZero: + xor %eax, %eax + xor %edx, %edx + ret diff --git a/MdePkg/Library/CompilerIntrinsicsLib/Ia32/udivdi3.S b/MdePkg/L= ibrary/CompilerIntrinsicsLib/Ia32/udivdi3.S new file mode 100644 index 000000000000..7dbae9c438a4 --- /dev/null +++ b/MdePkg/Library/CompilerIntrinsicsLib/Ia32/udivdi3.S @@ -0,0 +1,85 @@ +#-------------------------------------------------------------------------= ----- +# +# Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+# This program and the accompanying materials are licensed and made availa= ble +# under the terms and conditions of the BSD License which accompanies this +# distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. +# +# Module Name: +# +# MathDivU64x64.S +# +# Abstract: +# +# 64-bit Math Worker Function. +# Divides a 64-bit unsigned value with a 64-bit unsigned value and retur= ns +# a 64-bit unsigned result. +# +#-------------------------------------------------------------------------= ----- + + .686: + .code: + +ASM_GLOBAL ASM_PFX(__udivdi3), ASM_PFX(DivU64x64Remainder) + +#-------------------------------------------------------------------------= ----- +# +# void __cdecl __udivdi3 (void) +# +#-------------------------------------------------------------------------= ----- +ASM_PFX(__udivdi3): + # Original local stack when calling __udivdi3 + # ----------------- + # | | + # |---------------| + # | | + # |-- Divisor --| + # | | + # |---------------| + # | | + # |-- Dividend --| + # | | + # |---------------| + # | ReturnAddr** | + # ESP---->|---------------| + # + + # + # Set up the local stack for NULL Reminder pointer + # + xorl %eax, %eax + push %eax + + # + # Set up the local stack for Divisor parameter + # + movl 20(%esp), %eax + push %eax + movl 20(%esp), %eax + push %eax + + # + # Set up the local stack for Dividend parameter + # + movl 20(%esp), %eax + push %eax + movl 20(%esp), %eax + push %eax + + # + # Call native DivU64x64Remainder of BaseLib + # + jmp ASM_PFX(DivU64x64Remainder) + + # + # Adjust stack + # + addl $20, %esp + + ret $16 diff --git a/MdePkg/Library/CompilerIntrinsicsLib/Ia32/umoddi3.S b/MdePkg/L= ibrary/CompilerIntrinsicsLib/Ia32/umoddi3.S new file mode 100644 index 000000000000..6907eaabccc7 --- /dev/null +++ b/MdePkg/Library/CompilerIntrinsicsLib/Ia32/umoddi3.S @@ -0,0 +1,91 @@ +#-------------------------------------------------------------------------= ----- +# +# Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+# This program and the accompanying materials are licensed and made availa= ble +# under the terms and conditions of the BSD License which accompanies this +# distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. +# +# Module Name: +# +# MathReminderU64x64.S +# +# Abstract: +# +# 64-bit Math Worker Function. +# Divides a 64-bit unsigned value by another 64-bit unsigned value and r= eturns +# the 64-bit unsigned remainder +# +#-------------------------------------------------------------------------= ----- + + .686: + .code: + +ASM_GLOBAL ASM_PFX(__umoddi3), ASM_PFX(DivU64x64Remainder) + +#-------------------------------------------------------------------------= ----- +# +# void __cdecl __umoddi3 (void) +# +#-------------------------------------------------------------------------= ----- +ASM_PFX(__umoddi3): + # Original local stack when calling __umoddi3 + # ----------------- + # | | + # |---------------| + # | | + # |-- Divisor --| + # | | + # |---------------| + # | | + # |-- Dividend --| + # | | + # |---------------| + # | ReturnAddr** | + # ESP---->|---------------| + # + + # + # Set up the local stack for Reminder pointer + # + sub $8, %esp + push %esp + + # + # Set up the local stack for Divisor parameter + # + movl 28(%esp), %eax + push %eax + movl 28(%esp), %eax + push %eax + + # + # Set up the local stack for Dividend parameter + # + movl 28(%esp), %eax + push %eax + movl 28(%esp), %eax + push %eax + + # + # Call native DivU64x64Remainder of BaseLib + # + jmp ASM_PFX(DivU64x64Remainder) + + # + # Put the Reminder in EDX:EAX as return value + # + movl 20(%esp), %eax + movl 24(%esp), %edx + + # + # Adjust stack + # + add $28, %esp + + ret $16 --=20 2.36.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 (#90185): https://edk2.groups.io/g/devel/message/90185 Mute This Topic: https://groups.io/mt/91519711/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 16 16:08:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+90184+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90184+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654259214; cv=none; d=zohomail.com; s=zohoarc; b=YwnyZy1q2e1B31KtbzDhnJPrLb1uqTG9ymNrQKwda+mY68l3tgPoAZL7RmEqV6ooqWT5m+zHqOCyVuduc7xBxBu7zzo31KuynEntW9WZfnVwE9Kcm5DBIIBnQdOJdfHtfdNWuXGLXHzo40DGuxHGZYS4chejXNPc2HRkS3fZdUU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654259214; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=+y7wgQHxNUPZjQXFGiIOGBlk10nwce2oHkpjPaQbpDs=; b=UIYvpKoKLUr8Bbo8syejQJ93wTRWK4faBIirRJyKxnCwUlnT8DnUFoaZEutqLwfvZKgkeK2sqk7yPGN8MC22GlRofowg2+bhIjd3rTYwByGdejH7CMPfr/uZehYrYqdE1gj4ZScU2bmnO2VSmxTxV3Ep74elgC5ouwQ9IbWFqKE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90184+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1654259214949408.63445785068257; Fri, 3 Jun 2022 05:26:54 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id cIWcYY1788612xfx7ODa2k6P; Fri, 03 Jun 2022 05:26:54 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web09.6549.1654259212764219408 for ; Fri, 03 Jun 2022 05:26:53 -0700 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-563-WAPk8QxuNlaGzgNqxBduBQ-1; Fri, 03 Jun 2022 08:26:50 -0400 X-MC-Unique: WAPk8QxuNlaGzgNqxBduBQ-1 X-Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 48CCF85A5BC; Fri, 3 Jun 2022 12:26:48 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 051AB140EBD5; Fri, 3 Jun 2022 12:26:48 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 1453518009D6; Fri, 3 Jun 2022 14:26:39 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Jian J Wang , Jiaxin Wu , Sean Brogan , Anthony Perard , Leif Lindholm , Zhiguang Liu , Xiaoyu Lu , Pawel Polawski , Sami Mujawar , Maciej Rabeda , Bob Feng , Jiewen Yao , Andrew Fish , Bret Barkelew , Alexei Fedorov , Guo Dong , Gerd Hoffmann , kilian_kegel@hotmail.com, Maurice Ma , Siyuan Fu , Abner Chang , Zhichao Gao , Wei6 Xu , Supreeth Venkatesh , Julien Grall , Daniel Schaefer , Ard Biesheuvel , Guomin Jiang , Jordan Justen , Oliver Steffen , Sebastien Boeuf , Benjamin You , Min Xu , Ray Ni , Rebecca Cran , Nickle Wang , Michael D Kinney , Tom Lendacky , Sami Mujawar , Peter Grehan , Erdem Aktas , Brijesh Singh , James Bottomley , Yuwei Chen , Liming Gao Subject: [edk2-devel] [PATCH v4 6/9] MdePkg/CompilerIntrinsicsLib: drop include from Gcc.c Date: Fri, 3 Jun 2022 14:26:35 +0200 Message-Id: <20220603122638.1547060-7-kraxel@redhat.com> In-Reply-To: <20220603122638.1547060-1-kraxel@redhat.com> References: <20220603122638.1547060-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: 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,kraxel@redhat.com X-Gm-Message-State: aSwYHFofWqeLKGMXNXOrUdarx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1654259214; bh=5Z0RKQzONL5tm2IbFdUWYqrUVJpfCF74Pejzgt6+KNQ=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=S4BEL4b9NmhhKn3ZfqKN+rAI/IJFbInKtd2wpwgszydB+NC+QoXcp7rY16Tj7IgkrcR 763lHb53dnpgggE84B0ssxmW1LUh6lem+6RmV5K110V3sTuP0QKbgZMTq02R9mIg1l9hC u2e/FFkENnjwWybBCSu99RTwt6zv8+sLe58= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1654259216660100021 Content-Type: text/plain; charset="utf-8"; x-default="true" Does not exist and is not needed. Signed-off-by: Gerd Hoffmann Acked-by: Liming Gao --- MdePkg/Library/CompilerIntrinsicsLib/Ia32/Gcc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/MdePkg/Library/CompilerIntrinsicsLib/Ia32/Gcc.c b/MdePkg/Libra= ry/CompilerIntrinsicsLib/Ia32/Gcc.c index bb211022c0e4..d0996d6276bc 100644 --- a/MdePkg/Library/CompilerIntrinsicsLib/Ia32/Gcc.c +++ b/MdePkg/Library/CompilerIntrinsicsLib/Ia32/Gcc.c @@ -17,7 +17,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include #include -#include =20 #include =20 --=20 2.36.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 (#90184): https://edk2.groups.io/g/devel/message/90184 Mute This Topic: https://groups.io/mt/91519710/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 16 16:08:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+90182+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90182+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654259214; cv=none; d=zohomail.com; s=zohoarc; b=Kq4LWq9K2vV/9PZE75vko/SMr8cMbT2NFyIp4GICGF9JlMrDgt4iJCD3gmTX10p3K8wAT024D1PuM/0ULcnAZNvCbl+1yPcSaPpEdY9LLdSAwpZiPiU74w06twuSFArHN47szv447EZKxzn4rv2OiawusgMytosY3CEncVPT10k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654259214; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=1Vrt95zCWc1ac0q9XTJvcOnOlheHMIhR/9lg6BYSF1g=; b=Zlz971bI5drZakwwx9HS3gXhxNseMo8rCwoHtxabsW6GN5PHQJvKZCC8DeGMqIWMjbD/Fm0tMtJMMYaN8XtQURe1kogcxAPTHXxqGF0RzQb7WFoHlBDRoD7BMPMZO6UA4A6gQdebx1MGgrsLHoaU59vx1AzhXanY9/QcKR2Y3FU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90182+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1654259214567911.4644390252432; Fri, 3 Jun 2022 05:26:54 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id FjVRYY1788612xIGrEolWM5y; Fri, 03 Jun 2022 05:26:54 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.6658.1654259212732631086 for ; Fri, 03 Jun 2022 05:26:53 -0700 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-620-Pwl6-jHhNVCHd6tahtNJdQ-1; Fri, 03 Jun 2022 08:26:50 -0400 X-MC-Unique: Pwl6-jHhNVCHd6tahtNJdQ-1 X-Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 664AA101A54E; Fri, 3 Jun 2022 12:26:48 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F0EFF2166B26; Fri, 3 Jun 2022 12:26:47 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 190BB18009D8; Fri, 3 Jun 2022 14:26:39 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Jian J Wang , Jiaxin Wu , Sean Brogan , Anthony Perard , Leif Lindholm , Zhiguang Liu , Xiaoyu Lu , Pawel Polawski , Sami Mujawar , Maciej Rabeda , Bob Feng , Jiewen Yao , Andrew Fish , Bret Barkelew , Alexei Fedorov , Guo Dong , Gerd Hoffmann , kilian_kegel@hotmail.com, Maurice Ma , Siyuan Fu , Abner Chang , Zhichao Gao , Wei6 Xu , Supreeth Venkatesh , Julien Grall , Daniel Schaefer , Ard Biesheuvel , Guomin Jiang , Jordan Justen , Oliver Steffen , Sebastien Boeuf , Benjamin You , Min Xu , Ray Ni , Rebecca Cran , Nickle Wang , Michael D Kinney , Tom Lendacky , Sami Mujawar , Peter Grehan , Erdem Aktas , Brijesh Singh , James Bottomley , Yuwei Chen , Liming Gao Subject: [edk2-devel] [PATCH v4 7/9] MdePkg/CompilerIntrinsicsLib: drop debug logging from Gcc.c Date: Fri, 3 Jun 2022 14:26:36 +0200 Message-Id: <20220603122638.1547060-8-kraxel@redhat.com> In-Reply-To: <20220603122638.1547060-1-kraxel@redhat.com> References: <20220603122638.1547060-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: 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,kraxel@redhat.com X-Gm-Message-State: ZnSCgQtNDjwi7OFpVpkoLQYxx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1654259214; bh=iOGQCmUh7FtQlXLwE+pwbt+9MZVHHa3tyIUIYPQPyo8=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=mFRXxzY6oUjwNi5oOqv2lDjf/911K82JCKW7STKJ4C8jvkuIYl8YA5xHWuPPwywFhA9 qPOhBATll4OStOQiSpkkNog5KZEr93JqW+olmX2KfV5abl67WXIdvdXD2UNGPiGGpdtmd /1JQZklz0WE3AplNlLjDseXp23OOmxlV3iA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1654259216662100022 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Gerd Hoffmann Acked-by: Liming Gao --- .../Library/CompilerIntrinsicsLib/Ia32/Gcc.c | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/MdePkg/Library/CompilerIntrinsicsLib/Ia32/Gcc.c b/MdePkg/Libra= ry/CompilerIntrinsicsLib/Ia32/Gcc.c index d0996d6276bc..3c47bef63c4d 100644 --- a/MdePkg/Library/CompilerIntrinsicsLib/Ia32/Gcc.c +++ b/MdePkg/Library/CompilerIntrinsicsLib/Ia32/Gcc.c @@ -28,7 +28,6 @@ __ashlsi3 ( int Count ) { - DEBUG ((DEBUG_INFO, "%a:\n", __func__)); return (int)LShiftU64 ((UINT64)Datum, (UINTN)Count); } =20 @@ -38,7 +37,6 @@ __ashldi3 ( int Count ) { - DEBUG ((DEBUG_INFO, "%a:\n", __func__)); return (long)LShiftU64 ((UINT64)Datum, (UINTN)Count); } =20 @@ -48,7 +46,6 @@ __ashlti3 ( int Count ) { - DEBUG ((DEBUG_INFO, "%a:\n", __func__)); return (long long)LShiftU64 ((UINT64)Datum, (UINTN)Count); } =20 @@ -60,7 +57,6 @@ __ashrsi3 ( int Count ) { - DEBUG ((DEBUG_INFO, "%a:\n", __func__)); return (int)ARShiftU64 ((UINT64)Datum, (UINTN)Count); } =20 @@ -70,7 +66,6 @@ __ashrdi3 ( int Count ) { - DEBUG ((DEBUG_INFO, "%a:\n", __func__)); return (long)ARShiftU64 ((UINT64)Datum, (UINTN)Count); } =20 @@ -80,7 +75,6 @@ __ashrti3 ( int Count ) { - DEBUG ((DEBUG_INFO, "%a:\n", __func__)); return (long long)ARShiftU64 ((UINT64)Datum, (UINTN)Count); } =20 @@ -92,7 +86,6 @@ __divsi3 ( int Divisor ) { - DEBUG ((DEBUG_INFO, "%a:\n", __func__)); return (int)DivS64x64Remainder ((INT64)Dividend, (INT64)Divisor, NULL); } =20 @@ -105,7 +98,6 @@ __divdi3 ( INT64 Quotient; =20 Quotient =3D DivS64x64Remainder ((INT64)Dividend, (INT64)Divisor, NULL); - DEBUG ((DEBUG_INFO, "%a: %Ld / %Ld =3D %Ld\n", __func__, Dividend, Divis= or, Quotient)); =20 return Quotient; } @@ -116,7 +108,6 @@ __divti3 ( long long Divisor ) { - DEBUG ((DEBUG_INFO, "%a:\n", __func__)); return (long long)DivS64x64Remainder ((INT64)Dividend, (INT64)Divisor, N= ULL); } =20 @@ -128,7 +119,6 @@ __lshrsi3 ( int Count ) { - DEBUG ((DEBUG_INFO, "%a:\n", __func__)); return (int)RShiftU64 ((UINT64)Datum, (UINTN)Count); } =20 @@ -138,7 +128,6 @@ __lshrdi3 ( int Count ) { - DEBUG ((DEBUG_INFO, "%a:\n", __func__)); return (long)RShiftU64 ((UINT64)Datum, (UINTN)Count); } =20 @@ -148,7 +137,6 @@ __lshrti3 ( int Count ) { - DEBUG ((DEBUG_INFO, "%a:\n", __func__)); return (long long)RShiftU64 ((UINT64)Datum, (UINTN)Count); } =20 @@ -163,7 +151,6 @@ __modsi3 ( INT64 Remainder; =20 (void)DivS64x64Remainder ((INT64)Dividend, (INT64)Divisor, &Remainder); - DEBUG ((DEBUG_INFO, "modsi3: %d %% %d =3D %d\n", Dividend, Divisor, (int= )Remainder)); =20 return (int)Remainder; } @@ -177,7 +164,6 @@ __moddi3 ( INT64 Remainder; =20 (void)DivS64x64Remainder ((INT64)Dividend, (INT64)Divisor, &Remainder); - DEBUG ((DEBUG_INFO, "moddi3: %Ld %% %Ld =3D %Ld\n", (INT64)Dividend, (IN= T64)Divisor, Remainder)); =20 return Remainder; } @@ -191,7 +177,6 @@ __modti3 ( INT64 Remainder; =20 (void)DivS64x64Remainder ((INT64)Dividend, (INT64)Divisor, &Remainder); - DEBUG ((DEBUG_INFO, "modti3: %Ld %% %Ld =3D %Ld\n", (INT64)Dividend, (IN= T64)Divisor, Remainder)); =20 return (long long)Remainder; } @@ -204,7 +189,6 @@ __multi3 ( long long Multiplier ) { - DEBUG ((DEBUG_INFO, "%a:\n", __func__)); return (long long)MultS64x64 ((INT64)Multiplicand, (INT64)Multiplier); } =20 @@ -216,7 +200,6 @@ __udivsi3 ( unsigned int Divisor ) { - DEBUG ((DEBUG_INFO, "%a:\n", __func__)); return (int)DivU64x64Remainder ((UINT64)Dividend, (UINT64)Divisor, NULL); } =20 @@ -226,7 +209,6 @@ __udivdi3 ( unsigned long Divisor ) { - DEBUG ((DEBUG_INFO, "%a:\n", __func__)); return (long)DivU64x64Remainder ((UINT64)Dividend, (UINT64)Divisor, NULL= ); } =20 @@ -236,7 +218,6 @@ __udivti3 ( unsigned long long Divisor ) { - DEBUG ((DEBUG_INFO, "%a:\n", __func__)); return (long long)DivU64x64Remainder ((UINT64)Dividend, (UINT64)Divisor,= NULL); } =20 @@ -249,7 +230,6 @@ __umodsi3 ( { UINT64 Remainder; =20 - DEBUG ((DEBUG_INFO, "%a:\n", __func__)); (void)DivU64x64Remainder ((UINT64)Dividend, (UINT64)Divisor, &Remainder); =20 return (unsigned int)Remainder; @@ -263,7 +243,6 @@ __umoddi3 ( { UINT64 Remainder; =20 - DEBUG ((DEBUG_INFO, "%a:\n", __func__)); (void)DivU64x64Remainder ((UINT64)Dividend, (UINT64)Divisor, &Remainder); =20 return (unsigned long)Remainder; @@ -277,7 +256,6 @@ __umodti3 ( { UINT64 Remainder; =20 - DEBUG ((DEBUG_INFO, "%a:\n", __func__)); (void)DivU64x64Remainder ((UINT64)Dividend, (UINT64)Divisor, &Remainder); =20 return (unsigned long long)Remainder; --=20 2.36.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 (#90182): https://edk2.groups.io/g/devel/message/90182 Mute This Topic: https://groups.io/mt/91519708/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 16 16:08:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+90188+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90188+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654259218; cv=none; d=zohomail.com; s=zohoarc; b=HhiVXLfyqJyJvZgl4p1gb6PL9WpcUH1dnfBOSiz58n218jWWICQVMy0bG/+rAu+rQRBj9hklVbr6fTqs16bTV28ZvgLmDy20Se8dQgQC3h7eRxK1/Z4+3GsIzwLZCieSp5Mt9h4i4TIaaDiPtXQMClN2HYwHW/7pdIrqtRGUgoY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654259218; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=ADCpFWzqe7N+riCZXKXvOi/w67ngFBKFbZlfTQnbsIE=; b=aZjUzyBHElOvuOq/vMfPF8MB0eNjdjYuRYKtgJKx2DldBPu4GmqPMTHFMwbjoCVDEDV2ku2R5PYzTF3wuUu3jhxfp6CjcaDx231YkD8Z6/AhycDLkQB4m4zgZJ/6Fae5s9jt78TNKYJeM3SrJhYBlgDHaNFzCDdi4QQtA0IUGzg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90188+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1654259217998854.5776391564355; Fri, 3 Jun 2022 05:26:57 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id Oh7FYY1788612xl2i7nUAQgV; Fri, 03 Jun 2022 05:26:57 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web08.6576.1654259216820736381 for ; Fri, 03 Jun 2022 05:26:57 -0700 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-163-clBgjQYLNT23ydt36RmTjg-1; Fri, 03 Jun 2022 08:26:52 -0400 X-MC-Unique: clBgjQYLNT23ydt36RmTjg-1 X-Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 025E0801228; Fri, 3 Jun 2022 12:26:50 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BB6D91410F36; Fri, 3 Jun 2022 12:26:49 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 1DD8618009D9; Fri, 3 Jun 2022 14:26:39 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Jian J Wang , Jiaxin Wu , Sean Brogan , Anthony Perard , Leif Lindholm , Zhiguang Liu , Xiaoyu Lu , Pawel Polawski , Sami Mujawar , Maciej Rabeda , Bob Feng , Jiewen Yao , Andrew Fish , Bret Barkelew , Alexei Fedorov , Guo Dong , Gerd Hoffmann , kilian_kegel@hotmail.com, Maurice Ma , Siyuan Fu , Abner Chang , Zhichao Gao , Wei6 Xu , Supreeth Venkatesh , Julien Grall , Daniel Schaefer , Ard Biesheuvel , Guomin Jiang , Jordan Justen , Oliver Steffen , Sebastien Boeuf , Benjamin You , Min Xu , Ray Ni , Rebecca Cran , Nickle Wang , Michael D Kinney , Tom Lendacky , Sami Mujawar , Peter Grehan , Erdem Aktas , Brijesh Singh , James Bottomley , Yuwei Chen , Liming Gao Subject: [edk2-devel] [PATCH v4 8/9] MdePkg/CompilerIntrinsicsLib: remove duplicate functions from Gcc.c Date: Fri, 3 Jun 2022 14:26:37 +0200 Message-Id: <20220603122638.1547060-9-kraxel@redhat.com> In-Reply-To: <20220603122638.1547060-1-kraxel@redhat.com> References: <20220603122638.1547060-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: 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,kraxel@redhat.com X-Gm-Message-State: ZwNKNW5H6FzV4jE9xPwR39rUx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1654259217; bh=SY85j+uNkanMmOxI9sElSqk5rgEk/tVKMNZVRjMAakc=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=NGqmsqWBnSuhOQS9R7a2RHuvaRCPgyZ9HTjf7VqWCaAY4+f74j+NNWAcRMaWRz0L7yL Ji2X9VcCLe+ApzRpD7NACTSFcOtVnlK0wD46GfEIOjAp5oXbAv5Xpl51NCyXWgE1zIB5M 5vLTRzk267YIE6JBHjYkt/MawZ/qDO4+y2I= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1654259218752100033 Content-Type: text/plain; charset="utf-8"; x-default="true" Implementations for those functions already exist, so remove them to avoid duplicate symbols. Signed-off-by: Gerd Hoffmann Acked-by: Liming Gao --- .../Library/CompilerIntrinsicsLib/Ia32/Gcc.c | 47 ------------------- 1 file changed, 47 deletions(-) diff --git a/MdePkg/Library/CompilerIntrinsicsLib/Ia32/Gcc.c b/MdePkg/Libra= ry/CompilerIntrinsicsLib/Ia32/Gcc.c index 3c47bef63c4d..7502d5afe65a 100644 --- a/MdePkg/Library/CompilerIntrinsicsLib/Ia32/Gcc.c +++ b/MdePkg/Library/CompilerIntrinsicsLib/Ia32/Gcc.c @@ -20,55 +20,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20 #include =20 -// Shift Datum left by Count bits. -// =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D -int -__ashlsi3 ( - int Datum, - int Count - ) -{ - return (int)LShiftU64 ((UINT64)Datum, (UINTN)Count); -} - -long -__ashldi3 ( - long Datum, - int Count - ) -{ - return (long)LShiftU64 ((UINT64)Datum, (UINTN)Count); -} - -long long -__ashlti3 ( - long long Datum, - int Count - ) -{ - return (long long)LShiftU64 ((UINT64)Datum, (UINTN)Count); -} - // Arithmetically shift Datum right by Count bits. // =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D -int -__ashrsi3 ( - int Datum, - int Count - ) -{ - return (int)ARShiftU64 ((UINT64)Datum, (UINTN)Count); -} - -long -__ashrdi3 ( - long Datum, - int Count - ) -{ - return (long)ARShiftU64 ((UINT64)Datum, (UINTN)Count); -} - long long __ashrti3 ( long long Datum, --=20 2.36.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 (#90188): https://edk2.groups.io/g/devel/message/90188 Mute This Topic: https://groups.io/mt/91519714/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 16 16:08:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+90186+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90186+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654259216; cv=none; d=zohomail.com; s=zohoarc; b=ffGKB+H9Sbo+oftn7ica2rYXCAdkwkkXGmUr7XjzTFufsezHBrxzdSFU9Mdb2OqOD115LznSepwsBSSNu22TJYP/mBd9QhL7HbOI4fSsM+6Wd15BMJ1zWXFcMda4GBIipk2atlL7WhWM+veJqYZL4fbV4T6VDpUdICNTX1sxnlg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654259216; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=T5dpiarYyptVe6z1fXtU4d1sFoh+aXWLs2WPOCzIg3Q=; b=fqvxuFhd7hnGHIKQz85UmN+JpBcFLmw3PIv3Eu71H9l77nSP7yYq20Db1ys5iWsVCXvCdFpw80GXMIQWzH6y48kZ0NV31Kv7Tn54ykcH93fJePZ9yUF36NxxI8okNQOyjmEvgD5dMj+QhG4Lzm9KMigvhVubDHnREQz7C6GdsO4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90186+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1654259216619334.92732187868774; Fri, 3 Jun 2022 05:26:56 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 16bYYY1788612x0NOrpGfzjc; Fri, 03 Jun 2022 05:26:56 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web08.6574.1654259215379038998 for ; Fri, 03 Jun 2022 05:26:55 -0700 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-518-apVmSAgPOlqnUa71KjMGjg-1; Fri, 03 Jun 2022 08:26:51 -0400 X-MC-Unique: apVmSAgPOlqnUa71KjMGjg-1 X-Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0B63E100BABA; Fri, 3 Jun 2022 12:26:50 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BFFDA416366; Fri, 3 Jun 2022 12:26:49 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 2290A18009DA; Fri, 3 Jun 2022 14:26:39 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Jian J Wang , Jiaxin Wu , Sean Brogan , Anthony Perard , Leif Lindholm , Zhiguang Liu , Xiaoyu Lu , Pawel Polawski , Sami Mujawar , Maciej Rabeda , Bob Feng , Jiewen Yao , Andrew Fish , Bret Barkelew , Alexei Fedorov , Guo Dong , Gerd Hoffmann , kilian_kegel@hotmail.com, Maurice Ma , Siyuan Fu , Abner Chang , Zhichao Gao , Wei6 Xu , Supreeth Venkatesh , Julien Grall , Daniel Schaefer , Ard Biesheuvel , Guomin Jiang , Jordan Justen , Oliver Steffen , Sebastien Boeuf , Benjamin You , Min Xu , Ray Ni , Rebecca Cran , Nickle Wang , Michael D Kinney , Tom Lendacky , Sami Mujawar , Peter Grehan , Erdem Aktas , Brijesh Singh , James Bottomley , Yuwei Chen , Liming Gao Subject: [edk2-devel] [PATCH v4 9/9] MdePkg/CompilerIntrinsicsLib: add new sources to CompilerIntrinsicsLib.inf Date: Fri, 3 Jun 2022 14:26:38 +0200 Message-Id: <20220603122638.1547060-10-kraxel@redhat.com> In-Reply-To: <20220603122638.1547060-1-kraxel@redhat.com> References: <20220603122638.1547060-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: 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,kraxel@redhat.com X-Gm-Message-State: edEJ7x6flXUPo8y7wu8lGt9sx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1654259216; bh=sIw+/5umald5PABKgrv8xkeeziu0bbhIbPsfLzyV4uA=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=jSlRUl5spSsEjTieN7X6dDnyD/anzt3gB5eAKB6O/t5ZCvbZcbOAN1ahnWFP1lJ+92Z ZIzdZBHU2Dmci3y6Bq+kcQBotxGTr4LK+FNfrjTJvMXczmyV7JN4SFZtCjdOGh24rmynK k04/z4VxinCLrmy9CRDqgAxVhiFXHe7kZPU= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1654259218759100034 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Gerd Hoffmann Acked-by: Liming Gao --- .../CompilerIntrinsicsLib.inf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf= b/MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf index 7267d0e3154d..061dd40e6505 100644 --- a/MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf +++ b/MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf @@ -83,6 +83,22 @@ [Sources.IA32] Ia32/MathLShiftS64.nasm | GCC Ia32/MathRShiftU64.nasm | GCC =20 + Ia32/ulldiv.c | MSFT # __aulldiv + Ia32/ullrem.c | MSFT # __aullrem + Ia32/lldiv.c | MSFT # __alldiv + Ia32/llrem.c | MSFT # __allrem + Ia32/lldvrm.c | MSFT # __alldvrm + Ia32/ulldvrm.c | MSFT # __aulldvrm + + Ia32/ulldiv.c | INTEL + Ia32/ullrem.c | INTEL + Ia32/lldiv.c | INTEL + Ia32/llrem.c | INTEL + Ia32/lldvrm.c | INTEL + Ia32/ulldvrm.c | INTEL + + Ia32/Gcc.c | GCC + [Packages] MdePkg/MdePkg.dec =20 --=20 2.36.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 (#90186): https://edk2.groups.io/g/devel/message/90186 Mute This Topic: https://groups.io/mt/91519712/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-