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