fpsetsticky.S revision 1.2
1/* 2 * Written by Charles M. Hannum, Apr 9, 1995 3 * Public domain. 4 */ 5 6#include <machine/asm.h> 7 8#if defined(LIBC_SCCS) 9 .text 10 .asciz "$OpenBSD: fpsetsticky.S,v 1.2 1996/08/19 08:12:28 tholo Exp $" 11#endif 12 13ENTRY(fpsetsticky) 14 subl $28,%esp 15 16 fnstenv (%esp) 17 movl 4(%esp),%eax 18 movl %eax,%edx 19 20 andl $63,%eax 21 22 subl %eax,%edx 23 movl 32(%esp),%ecx 24 andl $63,%ecx 25 addl %ecx,%edx 26 movl %edx,4(%esp) 27 fldenv (%esp) 28 29 addl $28,%esp 30 ret 31