xref: /minix/lib/libc/arch/i386/gen/fpgetmask.S (revision 83ee113e)
1/*	$NetBSD: fpgetmask.S,v 1.5 2014/05/23 02:34:19 uebayasi Exp $	*/
2
3/*
4 * Written by J.T. Conklin, Apr 4, 1995
5 * Public domain.
6 */
7
8#include <machine/asm.h>
9
10#ifdef WEAK_ALIAS
11WEAK_ALIAS(fpgetmask, _fpgetmask)
12ENTRY(_fpgetmask)
13#else
14ENTRY(fpgetmask)
15#endif
16	subl $4,%esp
17	fnstcw (%esp)
18	movl (%esp),%eax
19	notl %eax
20	andl $63,%eax
21	addl $4,%esp
22	ret
23#ifdef WEAK_ALIAS
24END(_fpgetmask)
25#else
26END(fpgetmask)
27#endif
28