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/quad Don't worry about divide by 0 ...



details:   https://anonhg.NetBSD.org/src/rev/d26c011f0477
branches:  trunk
changeset: 786766:d26c011f0477
user:      matt <matt%NetBSD.org@localhost>
date:      Thu May 09 15:03:40 2013 +0000

description:
Don't worry about divide by 0 for kernel or standalone

diffstat:

 common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S  |  6 +++++-
 common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S |  6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diffs (69 lines):

diff -r 2fdc44c85d14 -r d26c011f0477 common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S
--- a/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S   Thu May 09 13:54:11 2013 +0000
+++ b/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S   Thu May 09 15:03:40 2013 +0000
@@ -29,11 +29,13 @@
 
 #include <machine/asm.h>
 
-RCSID("$NetBSD: __aeabi_ldivmod.S,v 1.6 2013/05/09 07:12:59 skrll Exp $")
+RCSID("$NetBSD: __aeabi_ldivmod.S,v 1.7 2013/05/09 15:03:40 matt Exp $")
 
 ENTRY(__aeabi_ldivmod)
+#if !defined(_KERNEL) && !defined(_STANDALONE)
        orrs    ip, r2, r3
        beq     .Ldivbyzero
+#endif
 
        push    {r4-r5, sl, lr}
 #define        NEG     r5
@@ -130,6 +132,7 @@
        pop     {r4-r5, sl, lr}
        RET
 
+#if !defined(_KERNEL) && !defined(_STANDALONE)
 .Ldivbyzero:
        push    {r0-r1, ip, lr}
        cmp     AHI, #0
@@ -140,4 +143,5 @@
        bl      PLT_SYM(__aeabi_ldiv0)
        pop     {r2-r3, ip, lr}
        RET
+#endif
 END(__aeabi_ldivmod)
diff -r 2fdc44c85d14 -r d26c011f0477 common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S
--- a/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S  Thu May 09 13:54:11 2013 +0000
+++ b/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S  Thu May 09 15:03:40 2013 +0000
@@ -29,7 +29,7 @@
 
 #include <machine/asm.h>
 
-RCSID("$NetBSD: __aeabi_uldivmod.S,v 1.5 2013/05/08 05:13:56 matt Exp $")
+RCSID("$NetBSD: __aeabi_uldivmod.S,v 1.6 2013/05/09 15:03:40 matt Exp $")
 
 /*
  * typedef struct { unsigned long long quo, rem } ulldiv_t;
@@ -38,8 +38,10 @@
  */
 
 ENTRY(__aeabi_uldivmod)
+#if !defined(_KERNEL) && !defined(_STANDALONE)
        orrs    ip, r2, r3
        beq     .Ldivbyzero
+#endif
 
        push    {r4,lr}
        sub     sp, sp, #16
@@ -54,6 +56,7 @@
        pop     {r2-r4,lr}
        RET
 
+#if !defined(_KERNEL) && !defined(_STANDALONE)
 .Ldivbyzero:
        push    {r0-r1,ip,lr}
        mvn     r0, #0
@@ -61,4 +64,5 @@
        bl      PLT_SYM(__aeabi_ldiv0)
        pop     {r2-r3,ip,lr}
        RET
+#endif
 END(__aeabi_uldivmod)



Home | Main Index | Thread Index | Old Index