Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/lib/libc/arch/i386/stdlib Pull up revision 1.6 (request...
details: https://anonhg.NetBSD.org/src/rev/4d46f8f83459
branches: netbsd-1-5
changeset: 490548:4d46f8f83459
user: jhawk <jhawk%NetBSD.org@localhost>
date: Fri Jan 26 02:59:14 2001 +0000
description:
Pull up revision 1.6 (requested by fvdl):
Implement workinf versions of div() and ldev(). Previously they returned
garbage, but were generally unused.
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 7a49f13984ef -r 4d46f8f83459 lib/libc/arch/i386/stdlib/div.S
--- a/lib/libc/arch/i386/stdlib/div.S Fri Jan 26 02:55:50 2001 +0000
+++ b/lib/libc/arch/i386/stdlib/div.S Fri Jan 26 02:59:14 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.5.20.1 2001/01/26 02:59:14 jhawk 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 7a49f13984ef -r 4d46f8f83459 lib/libc/arch/i386/stdlib/ldiv.S
--- a/lib/libc/arch/i386/stdlib/ldiv.S Fri Jan 26 02:55:50 2001 +0000
+++ b/lib/libc/arch/i386/stdlib/ldiv.S Fri Jan 26 02:59:14 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.5.20.1 2001/01/26 02:59:19 jhawk 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