xref: /DragonStub/lib/arm/llsr.S (revision 803b49c40bb0b720b90d9c31d372911f1b946aa7)
1#------------------------------------------------------------------------------
2#
3# Copyright (c) 2013, ARM. All rights reserved.<BR>
4#
5# This program and the accompanying materials
6# are licensed and made available under the terms and conditions of the BSD License
7# which accompanies this distribution.  The full text of the license may be found at
8# http://opensource.org/licenses/bsd-license.php
9#
10# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12#
13#------------------------------------------------------------------------------
14
15#include "edk2asm.h"
16
17.text
18.align 2
19GCC_ASM_EXPORT(__aeabi_llsr)
20
21#
22#VOID
23#EFIAPI
24#__aeabi_llsr (
25# IN  VOID    *Destination,
26# IN  VOID    *Source,
27# IN  UINT32  Size
28# );
29#
30ASM_PFX(__aeabi_llsr):
31    subs     r3,r2,#0x20
32    bpl      1f
33    rsb      r3,r2,#0x20
34    lsr      r0,r0,r2
35    orr      r0,r0,r1,lsl r3
36    lsr      r1,r1,r2
37    bx       lr
381:
39    lsr      r0,r1,r3
40    mov      r1,#0
41    bx       lr
42
43#if defined(__ELF__) && defined(__linux__)
44	.section .note.GNU-stack,"",%progbits
45#endif
46