1/* $OpenBSD: fpsetmask.S,v 1.3 2005/08/07 11:30:38 espie Exp $ */ 2/* 3 * Written by Charles M. Hannum, Apr 9, 1995 4 * Public domain. 5 */ 6 7#include <machine/asm.h> 8 9ENTRY(fpsetmask) 10 subl $4,%esp 11 12 fnstcw (%esp) 13 movl (%esp),%eax 14 movl %eax,%edx 15 16 notl %eax 17 andl $63,%eax 18 19 addl %eax,%edx 20 movl 8(%esp),%ecx 21 andl $63,%ecx 22 subl %ecx,%edx 23 movl %edx,(%esp) 24 fldcw (%esp) 25 26 addl $4,%esp 27 ret 28