xref: /netbsd-src/lib/libc/arch/alpha/gen/fpsetmask.c (revision c67d63d20769d18f14036a85f2f0080e9a50e0dd)
1*c67d63d2Schristos /*	$NetBSD: fpsetmask.c,v 1.5 2013/11/02 23:54:04 christos Exp $	*/
2d2e405e5Scgd 
3d2e405e5Scgd /*
4c5a82dd8Sross  * Copyright (c) 1995 Ross Harvey
5d2e405e5Scgd  * All rights reserved.
6d2e405e5Scgd  *
7d2e405e5Scgd  * Redistribution and use in source and binary forms, with or without
8d2e405e5Scgd  * modification, are permitted provided that the following conditions
9d2e405e5Scgd  * are met:
10d2e405e5Scgd  * 1. Redistributions of source code must retain the above copyright
11d2e405e5Scgd  *    notice, this list of conditions and the following disclaimer.
12d2e405e5Scgd  * 2. Redistributions in binary form must reproduce the above copyright
13d2e405e5Scgd  *    notice, this list of conditions and the following disclaimer in the
14d2e405e5Scgd  *    documentation and/or other materials provided with the distribution.
15d2e405e5Scgd  * 3. All advertising materials mentioning features or use of this software
16d2e405e5Scgd  *    must display the following acknowledgement:
17c5a82dd8Sross  *      This product includes software developed by Ross Harvey
18d2e405e5Scgd  *	for the NetBSD Project.
19d2e405e5Scgd  * 4. The name of the author may not be used to endorse or promote products
20d2e405e5Scgd  *    derived from this software without specific prior written permission
21d2e405e5Scgd  *
22d2e405e5Scgd  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23d2e405e5Scgd  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24d2e405e5Scgd  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25d2e405e5Scgd  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26d2e405e5Scgd  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27d2e405e5Scgd  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28d2e405e5Scgd  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29d2e405e5Scgd  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30d2e405e5Scgd  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31d2e405e5Scgd  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32d2e405e5Scgd  */
33d2e405e5Scgd 
345d3e8294Sthorpej #include <sys/cdefs.h>
3588c3eadbSlukem #if defined(LIBC_SCCS) && !defined(lint)
36*c67d63d2Schristos __RCSID("$NetBSD: fpsetmask.c,v 1.5 2013/11/02 23:54:04 christos Exp $");
3788c3eadbSlukem #endif /* LIBC_SCCS and not lint */
385d3e8294Sthorpej 
395d3e8294Sthorpej #include "namespace.h"
405d3e8294Sthorpej 
41d2e405e5Scgd #include <ieeefp.h>
42c5a82dd8Sross #include <machine/sysarch.h>
43d2e405e5Scgd 
445d3e8294Sthorpej #ifdef __weak_alias
__weak_alias(fpsetmask,_fpsetmask)455d3e8294Sthorpej __weak_alias(fpsetmask,_fpsetmask)
465d3e8294Sthorpej #endif
475d3e8294Sthorpej 
48d2e405e5Scgd fp_except
49*c67d63d2Schristos fpsetmask(fp_except mask)
50d2e405e5Scgd {
51c5a82dd8Sross 	struct alpha_fp_except_args a;
52d2e405e5Scgd 
53c5a82dd8Sross 	a.mask = mask;
54c5a82dd8Sross 	return sysarch(ALPHA_FPSETMASK, &a);
55d2e405e5Scgd }
56