]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/Library/CompilerIntrinsicsLib/Arm/llsr.asm
ArmPkg/Library/CompilerIntrinsicsLib: Enable VS2017/ARM builds
[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
6// This program and the accompanying materials\r
7// are licensed and made available under the terms and conditions of the BSD License\r
8// which accompanies this distribution. The full text of the license may be found at\r
9// http://opensource.org/licenses/bsd-license.php\r
10//\r
11// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13//\r
14//------------------------------------------------------------------------------\r
15\r
e58427e3
PB
16 EXPORT __aeabi_llsr\r
17 EXPORT __rt_srsh\r
1e57a462 18\r
e58427e3 19 AREA s___aeabi_llsr, CODE, READONLY, ARM\r
1e57a462 20\r
e58427e3 21 ARM\r
1e57a462 22\r
23;\r
24;VOID\r
25;EFIAPI\r
26;__aeabi_llsr (\r
e58427e3
PB
27; IN UINT64 Value,\r
28; IN UINT32 Shift\r
29;)\r
1e57a462 30;\r
e58427e3
PB
31__aeabi_llsr\r
32__rt_srsh\r
1e57a462 33 SUBS r3,r2,#0x20\r
e58427e3 34 BPL __aeabi_llsr_label1\r
1e57a462 35 RSB r3,r2,#0x20\r
36 LSR r0,r0,r2\r
37 ORR r0,r0,r1,LSL r3\r
38 LSR r1,r1,r2\r
39 BX lr\r
e58427e3 40__aeabi_llsr_label1\r
1e57a462 41 LSR r0,r1,r3\r
42 MOV r1,#0\r
43 BX lr\r
44\r
45 END\r