source: trunk/minix/lib/i386/int64/div64u.s@ 20

Last change on this file since 20 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 526 bytes
RevLine 
[9]1! div64u() - 64 bit divided by unsigned giving unsigned long
2! Author: Kees J. Bot
3! 7 Dec 1995
4.sect .text
5.define _div64u, _rem64u
6
7_div64u: ! unsigned long div64u(u64_t i, unsigned j);
8 xor edx, edx
9 mov eax, 8(esp) ! i = (ih<<32) + il
10 div 12(esp) ! ih = q * j + r
11 mov eax, 4(esp)
12 div 12(esp) ! i / j = (q<<32) + ((r<<32) + il) / j
13 ret
14
15_rem64u: ! unsigned rem64u(u64_t i, unsigned j);
16 pop ecx
17 call _div64u
18 mov eax, edx
19 jmp ecx
20
21!
22! $PchId: div64u.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
Note: See TracBrowser for help on using the repository browser.