blob: e9ec890881d18fbf4879e663665cfd46ba01ac92 [file] [log] [blame]
Wolfgang Denkba94a1b2006-05-30 15:56:48 +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 */
Wolfgang Denkba94a1b2006-05-30 15:56:48 +02006
Simon Glass1251d512015-06-02 11:08:20 -06007#include <linux/linkage.h>
Marek Vasut06b36cb2016-05-26 18:01:39 +02008#include <asm/assembler.h>
Simon Glass1251d512015-06-02 11:08:20 -06009
Wolfgang Denkba94a1b2006-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
Stephen Warrenb2f18582016-06-03 13:05:11 -060018.pushsection .text.__ashldi3, "ax"
Marek Vasut06b36cb2016-05-26 18:01:39 +020019ENTRY(__ashldi3)
Simon Glass1251d512015-06-02 11:08:20 -060020ENTRY(__aeabi_llsl)
Wolfgang Denkba94a1b2006-05-30 15:56:48 +020021
22 subs r3, r2, #32
23 rsb ip, r2, #32
24 movmi ah, ah, lsl r2
25 movpl ah, al, lsl r3
Marek Vasut06b36cb2016-05-26 18:01:39 +020026 ARM( orrmi ah, ah, al, lsr ip )
27 THUMB( lsrmi r3, al, ip )
28 THUMB( orrmi ah, ah, r3 )
Wolfgang Denkba94a1b2006-05-30 15:56:48 +020029 mov al, al, lsl r2
Marek Vasut06b36cb2016-05-26 18:01:39 +020030 ret lr
31
32ENDPROC(__ashldi3)
Simon Glass1251d512015-06-02 11:08:20 -060033ENDPROC(__aeabi_llsl)
Stephen Warrenb2f18582016-06-03 13:05:11 -060034.popsection