Browse Source

[ARM] 3104/1: ARM EABI: new helper function names

Patch from Nicolas Pitre

The ARM EABI defines new names for GCC helper functions.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Nicolas Pitre 19 years ago
parent
commit
ba95e4e4a0

+ 22 - 0
arch/arm/kernel/armksyms.c

@@ -35,6 +35,16 @@ extern void __udivsi3(void);
 extern void __umodsi3(void);
 extern void __umodsi3(void);
 extern void __do_div64(void);
 extern void __do_div64(void);
 
 
+extern void __aeabi_idiv(void);
+extern void __aeabi_idivmod(void);
+extern void __aeabi_lasr(void);
+extern void __aeabi_llsl(void);
+extern void __aeabi_llsr(void);
+extern void __aeabi_lmul(void);
+extern void __aeabi_uidiv(void);
+extern void __aeabi_uidivmod(void);
+extern void __aeabi_ulcmp(void);
+
 extern void fpundefinstr(void);
 extern void fpundefinstr(void);
 extern void fp_enter(void);
 extern void fp_enter(void);
 
 
@@ -141,6 +151,18 @@ EXPORT_SYMBOL(__udivsi3);
 EXPORT_SYMBOL(__umodsi3);
 EXPORT_SYMBOL(__umodsi3);
 EXPORT_SYMBOL(__do_div64);
 EXPORT_SYMBOL(__do_div64);
 
 
+#ifdef CONFIG_AEABI
+EXPORT_SYMBOL(__aeabi_idiv);
+EXPORT_SYMBOL(__aeabi_idivmod);
+EXPORT_SYMBOL(__aeabi_lasr);
+EXPORT_SYMBOL(__aeabi_llsl);
+EXPORT_SYMBOL(__aeabi_llsr);
+EXPORT_SYMBOL(__aeabi_lmul);
+EXPORT_SYMBOL(__aeabi_uidiv);
+EXPORT_SYMBOL(__aeabi_uidivmod);
+EXPORT_SYMBOL(__aeabi_ulcmp);
+#endif
+
 	/* bitops */
 	/* bitops */
 EXPORT_SYMBOL(_set_bit_le);
 EXPORT_SYMBOL(_set_bit_le);
 EXPORT_SYMBOL(_test_and_set_bit_le);
 EXPORT_SYMBOL(_test_and_set_bit_le);

+ 1 - 0
arch/arm/lib/ashldi3.S

@@ -37,6 +37,7 @@ Boston, MA 02110-1301, USA.  */
 #endif
 #endif
 
 
 ENTRY(__ashldi3)
 ENTRY(__ashldi3)
+ENTRY(__aeabi_llsl)
 
 
 	subs	r3, r2, #32
 	subs	r3, r2, #32
 	rsb	ip, r2, #32
 	rsb	ip, r2, #32

+ 1 - 0
arch/arm/lib/ashrdi3.S

@@ -37,6 +37,7 @@ Boston, MA 02110-1301, USA.  */
 #endif
 #endif
 
 
 ENTRY(__ashrdi3)
 ENTRY(__ashrdi3)
+ENTRY(__aeabi_lasr)
 
 
 	subs	r3, r2, #32
 	subs	r3, r2, #32
 	rsb	ip, r2, #32
 	rsb	ip, r2, #32

+ 23 - 0
arch/arm/lib/lib1funcs.S

@@ -206,6 +206,7 @@ Boston, MA 02111-1307, USA.  */
 
 
 
 
 ENTRY(__udivsi3)
 ENTRY(__udivsi3)
+ENTRY(__aeabi_uidiv)
 
 
 	subs	r2, r1, #1
 	subs	r2, r1, #1
 	moveq	pc, lr
 	moveq	pc, lr
@@ -246,6 +247,7 @@ ENTRY(__umodsi3)
 
 
 
 
 ENTRY(__divsi3)
 ENTRY(__divsi3)
+ENTRY(__aeabi_idiv)
 
 
 	cmp	r1, #0
 	cmp	r1, #0
 	eor	ip, r0, r1			@ save the sign of the result.
 	eor	ip, r0, r1			@ save the sign of the result.
@@ -303,6 +305,27 @@ ENTRY(__modsi3)
 	rsbmi	r0, r0, #0
 	rsbmi	r0, r0, #0
 	mov	pc, lr
 	mov	pc, lr
 
 
+#ifdef CONFIG_AEABI
+
+ENTRY(__aeabi_uidivmod)
+
+	stmfd	sp!, {r0, r1, ip, lr}
+	bl	__aeabi_uidiv
+	ldmfd	sp!, {r1, r2, ip, lr}
+	mul	r3, r0, r2
+	sub	r1, r1, r3
+	mov	pc, lr
+
+ENTRY(__aeabi_idivmod)
+
+	stmfd	sp!, {r0, r1, ip, lr}
+	bl	__aeabi_idiv
+	ldmfd	sp!, {r1, r2, ip, lr}
+	mul	r3, r0, r2
+	sub	r1, r1, r3
+	mov	pc, lr
+
+#endif
 
 
 Ldiv0:
 Ldiv0:
 
 

+ 1 - 0
arch/arm/lib/lshrdi3.S

@@ -37,6 +37,7 @@ Boston, MA 02110-1301, USA.  */
 #endif
 #endif
 
 
 ENTRY(__lshrdi3)
 ENTRY(__lshrdi3)
+ENTRY(__aeabi_llsr)
 
 
 	subs	r3, r2, #32
 	subs	r3, r2, #32
 	rsb	ip, r2, #32
 	rsb	ip, r2, #32

+ 1 - 0
arch/arm/lib/muldi3.S

@@ -25,6 +25,7 @@
 #endif
 #endif
 
 
 ENTRY(__muldi3)
 ENTRY(__muldi3)
+ENTRY(__aeabi_lmul)
 
 
 	mul	xh, yl, xh
 	mul	xh, yl, xh
 	mla	xh, xl, yh, xh
 	mla	xh, xl, yh, xh

+ 14 - 0
arch/arm/lib/ucmpdi2.S

@@ -10,6 +10,7 @@
  *  published by the Free Software Foundation.
  *  published by the Free Software Foundation.
  */
  */
 
 
+#include <linux/config.h>
 #include <linux/linkage.h>
 #include <linux/linkage.h>
 
 
 #ifdef __ARMEB__
 #ifdef __ARMEB__
@@ -33,3 +34,16 @@ ENTRY(__ucmpdi2)
 	movhi	r0, #2
 	movhi	r0, #2
 	mov	pc, lr
 	mov	pc, lr
 
 
+#ifdef CONFIG_AEABI
+
+ENTRY(__aeabi_ulcmp)
+
+	cmp	xh, yh
+	cmpeq	xl, yl
+	movlo	r0, #-1
+	moveq	r0, #0
+	movhi	r0, #1
+	mov	pc, lr
+
+#endif
+