11.6Schristos/* $NetBSD: fpgetmask.c,v 1.6 2012/06/24 15:26:02 christos Exp $ */ 21.1Seeh 31.1Seeh/* 41.1Seeh * Written by J.T. Conklin, Apr 10, 1995 51.1Seeh * Public domain. 61.1Seeh */ 71.1Seeh 81.2Sthorpej#include <sys/cdefs.h> 91.3Slukem#if defined(LIBC_SCCS) && !defined(lint) 101.6Schristos__RCSID("$NetBSD: fpgetmask.c,v 1.6 2012/06/24 15:26:02 christos Exp $"); 111.3Slukem#endif /* LIBC_SCCS and not lint */ 121.2Sthorpej 131.2Sthorpej#include "namespace.h" 141.2Sthorpej 151.5Smartin#include <sys/types.h> 161.1Seeh#include <ieeefp.h> 171.2Sthorpej 181.2Sthorpej#ifdef __weak_alias 191.2Sthorpej__weak_alias(fpgetmask,_fpgetmask) 201.2Sthorpej#endif 211.1Seeh 221.1Seehfp_except 231.6Schristosfpgetmask(void) 241.1Seeh{ 251.5Smartin uint32_t x; 261.1Seeh 271.4Sperry __asm("st %%fsr,%0" : "=m" (*&x)); 281.1Seeh return (x >> 23) & 0x1f; 291.1Seeh} 30