xref: /linux/arch/arm/lib/lshrdi3.S (revision ba95e4e4a0a8a3c6aba363d45f78d5f2e2d111eb)
1f741a1aaSNicolas Pitre/* Copyright 1995, 1996, 1998, 1999, 2000, 2003, 2004, 2005
2f741a1aaSNicolas Pitre   Free Software Foundation, Inc.
3f741a1aaSNicolas Pitre
4f741a1aaSNicolas PitreThis file is free software; you can redistribute it and/or modify it
5f741a1aaSNicolas Pitreunder the terms of the GNU General Public License as published by the
6f741a1aaSNicolas PitreFree Software Foundation; either version 2, or (at your option) any
7f741a1aaSNicolas Pitrelater version.
8f741a1aaSNicolas Pitre
9f741a1aaSNicolas PitreIn addition to the permissions in the GNU General Public License, the
10f741a1aaSNicolas PitreFree Software Foundation gives you unlimited permission to link the
11f741a1aaSNicolas Pitrecompiled version of this file into combinations with other programs,
12f741a1aaSNicolas Pitreand to distribute those combinations without any restriction coming
13f741a1aaSNicolas Pitrefrom the use of this file.  (The General Public License restrictions
14f741a1aaSNicolas Pitredo apply in other respects; for example, they cover modification of
15f741a1aaSNicolas Pitrethe file, and distribution when not linked into a combine
16f741a1aaSNicolas Pitreexecutable.)
17f741a1aaSNicolas Pitre
18f741a1aaSNicolas PitreThis file is distributed in the hope that it will be useful, but
19f741a1aaSNicolas PitreWITHOUT ANY WARRANTY; without even the implied warranty of
20f741a1aaSNicolas PitreMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21f741a1aaSNicolas PitreGeneral Public License for more details.
22f741a1aaSNicolas Pitre
23f741a1aaSNicolas PitreYou should have received a copy of the GNU General Public License
24f741a1aaSNicolas Pitrealong with this program; see the file COPYING.  If not, write to
25f741a1aaSNicolas Pitrethe Free Software Foundation, 51 Franklin Street, Fifth Floor,
26f741a1aaSNicolas PitreBoston, MA 02110-1301, USA.  */
27f741a1aaSNicolas Pitre
28f741a1aaSNicolas Pitre
29f741a1aaSNicolas Pitre#include <linux/linkage.h>
30f741a1aaSNicolas Pitre
31f741a1aaSNicolas Pitre#ifdef __ARMEB__
32f741a1aaSNicolas Pitre#define al r1
33f741a1aaSNicolas Pitre#define ah r0
34f741a1aaSNicolas Pitre#else
35f741a1aaSNicolas Pitre#define al r0
36f741a1aaSNicolas Pitre#define ah r1
37f741a1aaSNicolas Pitre#endif
38f741a1aaSNicolas Pitre
39f741a1aaSNicolas PitreENTRY(__lshrdi3)
40*ba95e4e4SNicolas PitreENTRY(__aeabi_llsr)
41f741a1aaSNicolas Pitre
42f741a1aaSNicolas Pitre	subs	r3, r2, #32
43f741a1aaSNicolas Pitre	rsb	ip, r2, #32
44f741a1aaSNicolas Pitre	movmi	al, al, lsr r2
45f741a1aaSNicolas Pitre	movpl	al, ah, lsr r3
46f741a1aaSNicolas Pitre	orrmi	al, al, ah, lsl ip
47f741a1aaSNicolas Pitre	mov	ah, ah, lsr r2
48f741a1aaSNicolas Pitre	mov	pc, lr
49f741a1aaSNicolas Pitre
50