aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/lib
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@uclinux.org>2011-11-11 00:13:08 -0500
committerGreg Ungerer <gerg@uclinux.org>2011-12-24 06:47:57 -0500
commit84f3fb7a2aadeda3c0a34e61591a8eccf5e367b4 (patch)
treea1d64dd3c6da8726cb74bb206d4da15228cfdae2 /arch/m68k/lib
parent7f73bafc4630a450ebe8b021efa14781ffd992b1 (diff)
m68k: handle presence of 64bit mul/div instructions cleanly
The traditional 68000 processors and the newer reduced instruction set ColdFire processors do not support the 32*32->64 multiply or the 64/32->32 divide instructions. This is not a difference based on the presence of a hardware MMU or not. Create a new config symbol to mark that a CPU type doesn't support the longer multiply/divide instructions. Use this then as a basis for using the fast 64bit based divide (in div64.h) and for linking in the extra libgcc functions that may be required (mulsi3, divsi3, etc). Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/lib')
-rw-r--r--arch/m68k/lib/Makefile8
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/m68k/lib/Makefile b/arch/m68k/lib/Makefile
index b3b40e4ed339..a9d782d34276 100644
--- a/arch/m68k/lib/Makefile
+++ b/arch/m68k/lib/Makefile
@@ -6,11 +6,9 @@
6lib-y := ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \ 6lib-y := ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \
7 memcpy.o memset.o memmove.o 7 memcpy.o memset.o memmove.o
8 8
9ifdef CONFIG_MMU 9lib-$(CONFIG_MMU) += string.o uaccess.o
10lib-y += string.o uaccess.o 10lib-$(CONFIG_CPU_HAS_NO_MULDIV64) += mulsi3.o divsi3.o udivsi3.o
11else 11lib-$(CONFIG_CPU_HAS_NO_MULDIV64) += modsi3.o umodsi3.o
12lib-y += mulsi3.o divsi3.o udivsi3.o modsi3.o umodsi3.o
13endif
14 12
15ifndef CONFIG_GENERIC_CSUM 13ifndef CONFIG_GENERIC_CSUM
16lib-y += checksum.o 14lib-y += checksum.o