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