FreeBSD and NetBSD both use derivates of Sun's math library. On FreeBSD,
[dragonfly.git] / lib / libm / arch / i386 / e_fmod.S
CommitLineData
b34b60bc
JS
1/*
2 * Written by J.T. Conklin <jtc@NetBSD.org>.
3 * Public domain.
4 *
5 * $NetBSD: e_fmod.S,v 1.7 2003/07/26 19:24:58 salo Exp $
6 * $DragonFly: src/lib/libm/arch/i386/e_fmod.S,v 1.1 2005/07/26 21:15:19 joerg Exp $
7 */
8
9#include <machine/asm.h>
10
11#include "abi.h"
12
13ENTRY(fmod)
14 XMM_TWO_ARG_DOUBLE_PROLOGUE
15 fldl ARG_DOUBLE_TWO
16 fldl ARG_DOUBLE_ONE
171: fprem
18 fstsw %ax
19 btw $10,%ax
20 jc 1b
21 fstp %st(1)
22 XMM_DOUBLE_EPILOGUE
23 ret