Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/common/lib/libc/arch/arm/gen This is ARM only
details: https://anonhg.NetBSD.org/src/rev/02e0f1c726a9
branches: trunk
changeset: 789446:02e0f1c726a9
user: matt <matt%NetBSD.org@localhost>
date: Mon Aug 19 03:47:06 2013 +0000
description:
This is ARM only
diffstat:
common/lib/libc/arch/arm/gen/divide.S | 45 +++++++++++++++++-----------------
1 files changed, 23 insertions(+), 22 deletions(-)
diffs (72 lines):
diff -r 81a981da1606 -r 02e0f1c726a9 common/lib/libc/arch/arm/gen/divide.S
--- a/common/lib/libc/arch/arm/gen/divide.S Mon Aug 19 03:44:47 2013 +0000
+++ b/common/lib/libc/arch/arm/gen/divide.S Mon Aug 19 03:47:06 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: divide.S,v 1.3 2013/06/20 07:16:23 matt Exp $ */
+/* $NetBSD: divide.S,v 1.4 2013/08/19 03:47:06 matt Exp $ */
/*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
@@ -23,25 +23,7 @@
* which makes a C call
*/
-.L_overflow:
-#if !defined(_KERNEL) && !defined(_STANDALONE)
-#ifdef __ARM_EABI__
- mov r0, r1 /* return quotient */
- b PLT_SYM(__aeabi_idiv0)
-#else
- mov r0, #8 /* SIGFPE */
- bl PLT_SYM(_C_LABEL(raise)) /* raise it */
- mov r0, #0
- RET
-#endif
-#else
- /* XXX should cause a fatal error */
- mvn r0, #0
- RET
-#endif
-
- .globl __udivide
-__udivide: /* r0 = r0 / r1; r1 = r0 % r1 */
+_ARM_ENTRY(__udivide) /* r0 = r0 / r1; r1 = r0 % r1 */
eor r0, r1, r0
eor r1, r0, r1
eor r0, r1, r0
@@ -61,9 +43,9 @@
mov r0, r1
mov r1, #0
RET
+END(__udivide)
- .globl __divide
-__divide: /* r0 = r0 / r1; r1 = r0 % r1 */
+_ARM_ENTRY(__divide) /* r0 = r0 / r1; r1 = r0 % r1 */
eor r0, r1, r0
eor r1, r0, r1
eor r0, r1, r0
@@ -377,4 +359,23 @@
mov r0, r3
RET
+.L_overflow:
+#if !defined(_KERNEL) && !defined(_STANDALONE)
+#ifdef __ARM_EABI__
+ mov r0, r1 /* return quotient */
+ b PLT_SYM(__aeabi_idiv0)
+#else
+ mov r0, #8 /* SIGFPE */
+ bl PLT_SYM(_C_LABEL(raise)) /* raise it */
+ mov r0, #0
+ RET
+#endif
+#else
+ /* XXX should cause a fatal error */
+ mvn r0, #0
+ RET
+#endif
+
+END(__divide)
+
#endif /* __ARM_ARCH_EXT_IDIV__ */
Home |
Main Index |
Thread Index |
Old Index