xref: /rk3399_rockchip-uboot/arch/arm/lib/ashrdi3.S (revision e2924e5904ae413e0b4a2a0d407267e7bbc2c7c4)
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
18ENTRY(__ashrdi3)
19ENTRY(__aeabi_lasr)
20.pushsection .text.__ashrdi3, "ax"
21
22	subs	r3, r2, #32
23	rsb	ip, r2, #32
24	movmi	al, al, lsr r2
25	movpl	al, ah, asr r3
26 ARM(	orrmi	al, al, ah, lsl ip	)
27 THUMB(	lslmi	r3, ah, ip		)
28 THUMB(	orrmi	al, al, r3		)
29	mov	ah, ah, asr r2
30	ret	lr
31
32.popsection
33ENDPROC(__ashrdi3)
34ENDPROC(__aeabi_lasr)
35