diff options
author | Raphael Poggi <poggi.raph@gmail.com> | 2016-07-04 13:52:46 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-07-06 11:23:48 +0200 |
commit | e1287b1a8b27d366f459e890fb260deea2906749 (patch) | |
tree | b2cca10b510e578438db046639fb6aa0f6e0d043 /arch/arm/lib32/ashrdi3.S | |
parent | 375170a3c9fad9d119a0a729da87b6285a2731ca (diff) | |
download | barebox-e1287b1a8b27d366f459e890fb260deea2906749.tar.gz barebox-e1287b1a8b27d366f459e890fb260deea2906749.tar.xz |
arm: rework lib directory to support arm64
This commit create a common directory, lib/,
for arm and arm64 common code.
It also create lib32/ and lib64/ for 32bit
and 64bit code respectively.
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/lib32/ashrdi3.S')
-rw-r--r-- | arch/arm/lib32/ashrdi3.S | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/arch/arm/lib32/ashrdi3.S b/arch/arm/lib32/ashrdi3.S new file mode 100644 index 0000000000..db849b65fc --- /dev/null +++ b/arch/arm/lib32/ashrdi3.S @@ -0,0 +1,50 @@ +/* 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. + +*/ + +#include <linux/linkage.h> + +#ifdef __ARMEB__ +#define al r1 +#define ah r0 +#else +#define al r0 +#define ah r1 +#endif + +.section .text.__ashrdi3 +ENTRY(__ashrdi3) +ENTRY(__aeabi_lasr) + + subs r3, r2, #32 + rsb ip, r2, #32 + movmi al, al, lsr r2 + movpl al, ah, asr r3 + ARM( orrmi al, al, ah, lsl ip ) + THUMB( lslmi r3, ah, ip ) + THUMB( orrmi al, al, r3 ) + mov ah, ah, asr r2 + mov pc, lr + +ENDPROC(__ashrdi3) +ENDPROC(__aeabi_lasr) |