mirror of
https://github.com/acidanthera/audk.git
synced 2025-08-15 06:38:08 +02:00
As per the emailed RFC in https://edk2.groups.io/g/devel/topic/rfc_move/107675828, this patch moves CompilerIntrinsicsLib from ArmPkg to MdePkg as this library provides compiler intrinsics, which are industry standard. This aligns with the goal of integrating ArmPkg into existing packages: https://bugzilla.tianocore.org/show_bug.cgi?id=4121. The newly placed CompilerIntrinsicsLib is added to MdeLibs.dsc.inc as every DSC that builds ARM/AARCH64 needs this library added. The old location is removed from every DSC in edk2 in this commit also to not break bisectability with minimal hoop jumping. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
34 lines
634 B
ArmAsm
34 lines
634 B
ArmAsm
#------------------------------------------------------------------------------
|
|
#
|
|
# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
#
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
#
|
|
#------------------------------------------------------------------------------
|
|
|
|
#include <AsmMacroLib.h>
|
|
|
|
ASM_FUNC(__ashlti3)
|
|
# return if shift is 0
|
|
cbz x2, 1f
|
|
|
|
mov x3, #64
|
|
sub x3, x3, x2
|
|
cmp x3, #0
|
|
b.le 2f
|
|
|
|
# shift is <= 64 bits
|
|
lsr x3, x0, x3
|
|
lsl x1, x1, x2
|
|
orr x1, x1, x3
|
|
lsl x0, x0, x2
|
|
1:
|
|
ret
|
|
|
|
2:
|
|
# shift is > 64
|
|
neg w3, w3
|
|
lsl x1, x0, x3
|
|
mov x0, #0
|
|
ret
|