blob: 1f9b91646494220efbfde3d1dc1939867cde0845 [file] [log] [blame]
Heiko Schocherdeec15b2009-07-23 13:27:04 +02001/* Copyright 1995, 1996, 1998, 1999, 2000, 2003, 2004, 2005
2 Free Software Foundation, Inc.
3
Wolfgang Denk1a459662013-07-08 09:37:19 +02004 * SPDX-License-Identifier: GPL-2.0+
5 */
Heiko Schocherdeec15b2009-07-23 13:27:04 +02006
Simon Glass1251d512015-06-02 11:08:20 -06007#include <linux/linkage.h>
8
Heiko Schocherdeec15b2009-07-23 13:27:04 +02009#ifdef __ARMEB__
10#define al r1
11#define ah r0
12#else
13#define al r0
14#define ah r1
15#endif
16
17.globl __lshrdi3
18__lshrdi3:
Simon Glass1251d512015-06-02 11:08:20 -060019ENTRY(__aeabi_llsr)
Heiko Schocherdeec15b2009-07-23 13:27:04 +020020
21 subs r3, r2, #32
22 rsb ip, r2, #32
23 movmi al, al, lsr r2
24 movpl al, ah, lsr r3
25 orrmi al, al, ah, lsl ip
26 mov ah, ah, lsr r2
27 mov pc, lr
Simon Glass1251d512015-06-02 11:08:20 -060028ENDPROC(__aeabi_llsr)