1 /* $NetBSD: fpsetmask.S,v 1.1 2001/06/19 00:25:03 fvdl Exp $ */ 2 3 /* 4 * Written by Charles M. Hannum, Apr 9, 1995 5 * Public domain. 6 */ 7 8 #include <machine/asm.h> 9 10 ENTRY(fpsetmask) 11 fnstcw -4(%rsp) 12 movl -4(%rsp),%eax 13 movl %eax,%edx 14 15 notl %eax 16 andl $63,%eax 17 18 addl %eax,%edx 19 andl $63,%edi 20 subl %edi,%edx 21 movl %edx,-4(%rsp) 22 fldcw -4(%rsp) 23 ret 24