summaryrefslogtreecommitdiff
path: root/arch/mips/lib/ashrdi3.c
diff options
context:
space:
mode:
authorAntony Pavlov <antonynpavlov@gmail.com>2018-04-11 10:50:19 +0300
committerJames Hogan <jhogan@kernel.org>2018-04-23 18:39:37 +0300
commit740129b36faf049e6845819144542a0455e1e285 (patch)
treeab8af98dc7e16bb923a91ef928a10c7d7da2dec6 /arch/mips/lib/ashrdi3.c
parent9ed491b88bc6f318c1a79d4f298ac0d78a2de587 (diff)
downloadlinux-740129b36faf049e6845819144542a0455e1e285.tar.xz
MIPS: Use generic GCC library routines from lib/
The commit b35cd9884fa5 ("lib: Add shared copies of some GCC library routines") makes it possible to share generic GCC library routines by several architectures. This commit removes several generic GCC library routines from arch/mips/lib/ in favour of similar routines from lib/. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> [Matt Redfearn] Use GENERIC_LIB_* named Kconfig entries Signed-off-by: Matt Redfearn <matt.redfearn@mips.com> Cc: Palmer Dabbelt <palmer@sifive.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/19051/ Signed-off-by: James Hogan <jhogan@kernel.org>
Diffstat (limited to 'arch/mips/lib/ashrdi3.c')
-rw-r--r--arch/mips/lib/ashrdi3.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/arch/mips/lib/ashrdi3.c b/arch/mips/lib/ashrdi3.c
deleted file mode 100644
index 23f5295af51e..000000000000
--- a/arch/mips/lib/ashrdi3.c
+++ /dev/null
@@ -1,32 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <linux/export.h>
-
-#include "libgcc.h"
-
-long long notrace __ashrdi3(long long u, word_type b)
-{
- DWunion uu, w;
- word_type bm;
-
- if (b == 0)
- return u;
-
- uu.ll = u;
- bm = 32 - b;
-
- if (bm <= 0) {
- /* w.s.high = 1..1 or 0..0 */
- w.s.high =
- uu.s.high >> 31;
- w.s.low = uu.s.high >> -bm;
- } else {
- const unsigned int carries = (unsigned int) uu.s.high << bm;
-
- w.s.high = uu.s.high >> b;
- w.s.low = ((unsigned int) uu.s.low >> b) | carries;
- }
-
- return w.ll;
-}
-
-EXPORT_SYMBOL(__ashrdi3);