summaryrefslogtreecommitdiffstats
path: root/arch/arm/lib/lshrdi3.S
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-01-14 16:44:19 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-01-17 08:28:08 +0100
commitd62f8241d3b8dbb8bec05d3d4f7580631b3f9690 (patch)
tree11fe73ae9134caed9c8a10ed54660038d400c285 /arch/arm/lib/lshrdi3.S
parent643ffef5f4a193208bfb257cf84533f02f849f67 (diff)
downloadbarebox-d62f8241d3b8dbb8bec05d3d4f7580631b3f9690.tar.gz
barebox-d62f8241d3b8dbb8bec05d3d4f7580631b3f9690.tar.xz
arm: libgcc update to linux v2.6.37
This patch removes the inclusion of libgcc functions into Barebox on the ARM architecture. Only the really needed functions are provided in the lib_arm directory. Those implementations are copied from Linux where they are well proven related to reliably, performance. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/lib/lshrdi3.S')
-rw-r--r--arch/arm/lib/lshrdi3.S53
1 files changed, 53 insertions, 0 deletions
diff --git a/arch/arm/lib/lshrdi3.S b/arch/arm/lib/lshrdi3.S
new file mode 100644
index 0000000000..f83d449141
--- /dev/null
+++ b/arch/arm/lib/lshrdi3.S
@@ -0,0 +1,53 @@
+/* Copyright 1995, 1996, 1998, 1999, 2000, 2003, 2004, 2005
+ Free Software Foundation, Inc.
+
+This file is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+
+In addition to the permissions in the GNU General Public License, the
+Free Software Foundation gives you unlimited permission to link the
+compiled version of this file into combinations with other programs,
+and to distribute those combinations without any restriction coming
+from the use of this file. (The General Public License restrictions
+do apply in other respects; for example, they cover modification of
+the file, and distribution when not linked into a combine
+executable.)
+
+This file is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; see the file COPYING. If not, write to
+the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA. */
+
+
+#include <linux/linkage.h>
+
+#ifdef __ARMEB__
+#define al r1
+#define ah r0
+#else
+#define al r0
+#define ah r1
+#endif
+
+ENTRY(__lshrdi3)
+ENTRY(__aeabi_llsr)
+
+ subs r3, r2, #32
+ rsb ip, r2, #32
+ movmi al, al, lsr r2
+ movpl al, ah, lsr r3
+ ARM( orrmi al, al, ah, lsl ip )
+ THUMB( lslmi r3, ah, ip )
+ THUMB( orrmi al, al, r3 )
+ mov ah, ah, lsr r2
+ mov pc, lr
+
+ENDPROC(__lshrdi3)
+ENDPROC(__aeabi_llsr)