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