]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/Library/CompilerIntrinsicsLib/Arm/llsr.asm
ArmPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / ArmPkg / Library / CompilerIntrinsicsLib / Arm / llsr.asm
CommitLineData
3402aac7 1//------------------------------------------------------------------------------\r
1e57a462 2//\r
3// Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
e58427e3 4// Copyright (c) 2018, Pete Batard. All rights reserved.<BR>\r
1e57a462 5//\r
4059386c 6// SPDX-License-Identifier: BSD-2-Clause-Patent\r
1e57a462 7//\r
8//------------------------------------------------------------------------------\r
9\r
e58427e3
PB
10 EXPORT __aeabi_llsr\r
11 EXPORT __rt_srsh\r
1e57a462 12\r
e58427e3 13 AREA s___aeabi_llsr, CODE, READONLY, ARM\r
1e57a462 14\r
e58427e3 15 ARM\r
1e57a462 16\r
17;\r
18;VOID\r
19;EFIAPI\r
20;__aeabi_llsr (\r
e58427e3
PB
21; IN UINT64 Value,\r
22; IN UINT32 Shift\r
23;)\r
1e57a462 24;\r
e58427e3
PB
25__aeabi_llsr\r
26__rt_srsh\r
1e57a462 27 SUBS r3,r2,#0x20\r
e58427e3 28 BPL __aeabi_llsr_label1\r
1e57a462 29 RSB r3,r2,#0x20\r
30 LSR r0,r0,r2\r
31 ORR r0,r0,r1,LSL r3\r
32 LSR r1,r1,r2\r
33 BX lr\r
e58427e3 34__aeabi_llsr_label1\r
1e57a462 35 LSR r0,r1,r3\r
36 MOV r1,#0\r
37 BX lr\r
38\r
39 END\r