xref: /netbsd-src/sys/external/bsd/gnu-efi/dist/lib/arm/llsl.S (revision 8e33eff89e26cf71871ead62f0d5063e1313c33a)
1/*	$NetBSD: llsl.S,v 1.1.1.1 2018/08/16 18:17:47 jmcneill Exp $	*/
2
3#------------------------------------------------------------------------------
4#
5# Copyright (c) 2013, ARM. All rights reserved.<BR>
6#
7# This program and the accompanying materials
8# are licensed and made available under the terms and conditions of the BSD License
9# which accompanies this distribution.  The full text of the license may be found at
10# http://opensource.org/licenses/bsd-license.php
11#
12# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14#
15#------------------------------------------------------------------------------
16
17#include "edk2asm.h"
18
19.text
20.align 2
21GCC_ASM_EXPORT(__aeabi_llsl)
22
23#
24#VOID
25#EFIAPI
26#__aeabi_llsl (
27# IN  VOID    *Destination,
28# IN  VOID    *Source,
29# IN  UINT32  Size
30# );
31#
32ASM_PFX(__aeabi_llsl):
33    subs     r3,r2,#0x20
34    bpl      1f
35    rsb      r3,r2,#0x20
36    lsl      r1,r1,r2
37    orr      r1,r1,r0,lsr r3
38    lsl      r0,r0,r2
39    bx       lr
401:
41    lsl      r1,r0,r3
42    mov      r0,#0
43    bx       lr
44