xref: /openbmc/u-boot/arch/arm/lib/ashldi3.S (revision ebce73f0)
1/* Copyright 1995, 1996, 1998, 1999, 2000, 2003, 2004, 2005
2   Free Software Foundation, Inc.
3
4 * SPDX-License-Identifier:	GPL-2.0+
5 */
6
7#include <linux/linkage.h>
8#include <asm/assembler.h>
9
10#ifdef __ARMEB__
11#define al r1
12#define ah r0
13#else
14#define al r0
15#define ah r1
16#endif
17
18.pushsection .text.__ashldi3, "ax"
19ENTRY(__ashldi3)
20ENTRY(__aeabi_llsl)
21
22	subs	r3, r2, #32
23	rsb	ip, r2, #32
24	movmi	ah, ah, lsl r2
25	movpl	ah, al, lsl r3
26 ARM(	orrmi	ah, ah, al, lsr ip	)
27 THUMB(	lsrmi	r3, al, ip		)
28 THUMB(	orrmi	ah, ah, r3		)
29	mov	al, al, lsl r2
30	ret	lr
31
32ENDPROC(__ashldi3)
33ENDPROC(__aeabi_llsl)
34.popsection
35