minix/lib/nbsd_libc/arch/i386/gen/fpsetsticky.S
Gianluca Guida b6cbf7203b Import unmodified NetBSD libc in trunk
This patch imports the unmodified current version of NetBSD libc.
The NetBSD includes are in /nbsd_include, while the libc code itself is 
split between lib/nbsd_libc and common/lib/libc.
2011-02-14 19:36:03 +00:00

32 lines
481 B
ArmAsm

/* $NetBSD: fpsetsticky.S,v 1.6 2002/01/13 21:45:43 thorpej Exp $ */
/*
* Written by Charles M. Hannum, Apr 9, 1995
* Public domain.
*/
#include <machine/asm.h>
#ifdef WEAK_ALIAS
WEAK_ALIAS(fpsetsticky, _fpsetsticky)
ENTRY(_fpsetsticky)
#else
ENTRY(fpsetsticky)
#endif
subl $28,%esp
fnstenv (%esp)
movl 4(%esp),%eax
movl %eax,%edx
andl $63,%eax
subl %eax,%edx
movl 32(%esp),%ecx
andl $63,%ecx
addl %ecx,%edx
movl %edx,4(%esp)
fldenv (%esp)
addl $28,%esp
ret