blob: a4f5ebbff13203bbe2622ffc7cfa43fcc5fec7a6 [file] [log] [blame]
Wolfgang Denk4646d2a2006-05-30 15:56:48 +02001/* Copyright 1995, 1996, 1998, 1999, 2000, 2003, 2004, 2005
2 Free Software Foundation, Inc.
3
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02004 * SPDX-License-Identifier: GPL-2.0+
5 */
Wolfgang Denk4646d2a2006-05-30 15:56:48 +02006
Simon Glassba4d90a2015-06-02 11:08:20 -06007#include <linux/linkage.h>
Marek Vasutc480fe72016-05-26 18:01:39 +02008#include <asm/assembler.h>
Simon Glassba4d90a2015-06-02 11:08:20 -06009
Wolfgang Denk4646d2a2006-05-30 15:56:48 +020010#ifdef __ARMEB__
11#define al r1
12#define ah r0
13#else
14#define al r0
15#define ah r1
16#endif
17
Marek Vasutc480fe72016-05-26 18:01:39 +020018ENTRY(__ashldi3)
Simon Glassba4d90a2015-06-02 11:08:20 -060019ENTRY(__aeabi_llsl)
Wolfgang Denk4646d2a2006-05-30 15:56:48 +020020
21 subs r3, r2, #32
22 rsb ip, r2, #32
23 movmi ah, ah, lsl r2
24 movpl ah, al, lsl r3
Marek Vasutc480fe72016-05-26 18:01:39 +020025 ARM( orrmi ah, ah, al, lsr ip )
26 THUMB( lsrmi r3, al, ip )
27 THUMB( orrmi ah, ah, r3 )
Wolfgang Denk4646d2a2006-05-30 15:56:48 +020028 mov al, al, lsl r2
Marek Vasutc480fe72016-05-26 18:01:39 +020029 ret lr
30
31ENDPROC(__ashldi3)
Simon Glassba4d90a2015-06-02 11:08:20 -060032ENDPROC(__aeabi_llsl)