NetBSD/lib/libm/arch/i387/s_sin.S

27 lines
339 B
ArmAsm
Raw Normal View History

1994-02-16 22:21:10 +03:00
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
1994-02-16 22:21:10 +03:00
*/
#include <machine/asm.h>
1995-05-09 03:55:16 +04:00
RCSID("$NetBSD: s_sin.S,v 1.5 1995/05/09 00:25:54 jtc Exp $")
1994-02-16 22:21:10 +03:00
ENTRY(sin)
fldl 4(%esp)
fsin
fnstsw %ax
andw $0x400,%ax
jnz 1f
ret
1: fldpi
1994-02-16 22:21:10 +03:00
fadd %st(0)
fxch %st(1)
2: fprem1
1994-02-16 22:21:10 +03:00
fnstsw %ax
andw $0x400,%ax
jnz 2b
1994-02-16 22:21:10 +03:00
fstp %st(1)
fsin
ret