1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/* * Written by J.T. Conklin <jtc@netbsd.org>. * Public domain. */ #include <machine/asm.h> __FBSDID("$FreeBSD$"); ENTRY(ldiv) 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