home *** CD-ROM | disk | FTP | other *** search
- / fmod.s (emx+gcc) -- Copyright (c) 1992-1993 by Steffen Haecker
-
- .globl _fmod
-
- .text
-
- .align 2, 0x90
-
- / double fmod (double x, double y)
-
- /define ret_addr 0(%esp)
- #define x 4(%esp)
- #define y 12(%esp)
-
- _fmod:
- fldl y / y
- ftst
- fstsww %ax
- andw $0x4100, %ax
- xorb $0x40, %ah
- jz 2f / y = 0 ?
- fldl x / x
- 1: fprem
- fstsww %ax
- andb $0x04, %ah
- jnz 1b / C2 != 0 ?
- fstp %st(1)
- 2: ret
-