]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/Library/CompilerIntrinsicsLib/Arm/ashrdi3.S
ArmPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / ArmPkg / Library / CompilerIntrinsicsLib / Arm / ashrdi3.S
CommitLineData
3402aac7 1#------------------------------------------------------------------------------\r
1e57a462 2#\r
3# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
4#\r
4059386c 5# SPDX-License-Identifier: BSD-2-Clause-Patent\r
1e57a462 6#\r
7#------------------------------------------------------------------------------\r
8\r
903e3124 9#include <AsmMacroIoLib.h>\r
1e57a462 10\r
903e3124 11ASM_FUNC(__ashrdi3)\r
1e57a462 12 cmp r2, #31\r
13 bls L2\r
14 cmp r2, #63\r
15 subls r2, r2, #32\r
16 mov ip, r1, asr #31\r
17 movls r2, r1, asr r2\r
18 movhi r2, ip\r
19 mov r0, r2\r
20 mov r1, ip\r
21 bx lr\r
22L2:\r
23 cmp r2, #0\r
24 rsbne r3, r2, #32\r
25 movne r3, r1, asl r3\r
26 movne r1, r1, asr r2\r
27 orrne r0, r3, r0, lsr r2\r
28 bx lr\r