repo.or.cz
/
minix3.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
tools/llvm: Do not build with symbols
[minix3.git]
/
lib
/
libc
/
arch
/
i386
/
stdlib
/
div.S
blob
7830b1e03b0d54cbbaf13ce9e72a86b063098c3b
1
/* $NetBSD: div.S,v 1.9 2011/06/12 20:29:25 plunky Exp $ */
2
/*
3
* Written by J.T. Conklin <jtc@NetBSD.org>.
4
* Public domain.
5
*/
6
7
#include <machine/asm.h>
8
9
#if defined(LIBC_SCCS)
10
RCSID("$NetBSD: div.S,v 1.9 2011/06/12 20:29:25 plunky Exp $")
11
#endif
12
13
ENTRY(div)
14
pushl %ebx
15
movl 8(%esp),%ebx
16
movl 12(%esp),%eax
17
movl 16(%esp),%ecx
18
cdq
19
idiv %ecx
20
movl %eax,(%ebx)
21
movl %edx,4(%ebx)
22
movl %ebx,%eax
23
popl %ebx
24
ret $4