repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Sync usage with man page.
[netbsd-mini2440.git]
/
regress
/
sys
/
arch
/
m68k
/
emuspeed
/
div64.S
blob
99bd23fdd5fffbc91ed85560ba1e65f0f32276a3
1
/* $NetBSD$ */
2
3
#include <m68k/asm.h>
4
5
/*
6
* stack:
7
* + 8: count
8
* + 4: retads
9
* + 0: d2
10
*/
11
12
ENTRY_NOPROFILE(div64ureg)
13
movl %d2,%sp@-
14
movl %sp@(8),%d2
15
L1:
16
divul %d2,%d1:%d0
17
subql #1,%d2
18
jne L1
19
movl %sp@+,%d2
20
rts
21
22
ENTRY_NOPROFILE(div64sreg)
23
movl %d2,%sp@-
24
movl %sp@(8),%d2
25
L2:
26
divsl %d2,%d1:%d0
27
subql #1,%d2
28
jne L2
29
movl %sp@+,%d2
30
rts
31
32
ENTRY_NOPROFILE(div64umem)
33
movl %d2,%sp@-
34
movl %sp@(8),%d2
35
L3:
36
divul %sp@(8),%d1:%d0
37
subql #1,%d2
38
jne L3
39
movl %sp@+,%d2
40
rts
41
42
ENTRY_NOPROFILE(div64smem)
43
movl %d2,%sp@-
44
movl %sp@(8),%d2
45
L4:
46
divsl %sp@(8),%d1:%d0
47
subql #1,%d2
48
jne L4
49
movl %sp@+,%d2
50
rts