1/* $NetBSD: fpsetsticky.S,v 1.6 2002/01/13 21:45:43 thorpej Exp $ */ 2 3/* 4 * Written by Charles M. Hannum, Apr 9, 1995 5 * Public domain. 6 */ 7 8#include <machine/asm.h> 9 10#ifdef WEAK_ALIAS 11WEAK_ALIAS(fpsetsticky, _fpsetsticky) 12ENTRY(_fpsetsticky) 13#else 14ENTRY(fpsetsticky) 15#endif 16 subl $28,%esp 17 18 fnstenv (%esp) 19 movl 4(%esp),%eax 20 movl %eax,%edx 21 22 andl $63,%eax 23 24 subl %eax,%edx 25 movl 32(%esp),%ecx 26 andl $63,%ecx 27 addl %ecx,%edx 28 movl %edx,4(%esp) 29 fldenv (%esp) 30 31 addl $28,%esp 32 ret 33