Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/arch/i386/stdlib Make these actually work (fixes PR...



details:   https://anonhg.NetBSD.org/src/rev/33e221098d37
branches:  trunk
changeset: 501857:33e221098d37
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Mon Jan 08 14:36:41 2001 +0000

description:
Make these actually work (fixes PR 11914).

diffstat:

 lib/libc/arch/i386/stdlib/div.S  |  19 +++++++++++--------
 lib/libc/arch/i386/stdlib/ldiv.S |  15 +++++++++------
 2 files changed, 20 insertions(+), 14 deletions(-)

diffs (56 lines):

diff -r aab8bb105ce2 -r 33e221098d37 lib/libc/arch/i386/stdlib/div.S
--- a/lib/libc/arch/i386/stdlib/div.S   Mon Jan 08 14:12:06 2001 +0000
+++ b/lib/libc/arch/i386/stdlib/div.S   Mon Jan 08 14:36:41 2001 +0000
@@ -6,14 +6,17 @@
 #include <machine/asm.h>
 
 #if defined(LIBC_SCCS)
-RCSID("$NetBSD: div.S,v 1.5 1995/04/28 22:59:46 jtc Exp $")
+RCSID("$NetBSD: div.S,v 1.6 2001/01/08 14:36:41 fvdl Exp $")
 #endif
 
 ENTRY(div)
-        movl    4(%esp),%eax
-        movl    8(%esp),%ecx
-        cdq
-        idiv    %ecx
-        movl    %eax,4(%esp)
-        movl    %edx,8(%esp)
-        ret
+       pushl   %ebx
+       movl    8(%esp),%ebx
+       movl    12(%esp),%eax
+       movl    16(%esp),%ecx
+       cdq
+       idiv    %ecx
+       movl    %eax,(%ebx)
+       movl    %edx,4(%ebx)
+       popl    %ebx
+       ret $4
diff -r aab8bb105ce2 -r 33e221098d37 lib/libc/arch/i386/stdlib/ldiv.S
--- a/lib/libc/arch/i386/stdlib/ldiv.S  Mon Jan 08 14:12:06 2001 +0000
+++ b/lib/libc/arch/i386/stdlib/ldiv.S  Mon Jan 08 14:36:41 2001 +0000
@@ -6,14 +6,17 @@
 #include <machine/asm.h>
 
 #if defined(LIBC_SCCS)
-RCSID("$NetBSD: ldiv.S,v 1.5 1995/04/28 22:59:52 jtc Exp $")
+RCSID("$NetBSD: ldiv.S,v 1.6 2001/01/08 14:36:41 fvdl Exp $")
 #endif
 
 ENTRY(ldiv)
-        movl    4(%esp),%eax
-        movl    8(%esp),%ecx
+       pushl   %ebx
+       movl    8(%esp),%ebx
+        movl    12(%esp),%eax
+        movl    16(%esp),%ecx
         cdq
         idiv    %ecx
-        movl    %eax,4(%esp)
-        movl    %edx,8(%esp)
-        ret
+        movl    %eax,(%ebx)
+        movl    %edx,4(%ebx)
+       popl    %ebx
+        ret $4



Home | Main Index | Thread Index | Old Index