1294833Sbr/*-
2294833Sbr * Copyright (c) 2004 David Schultz <das@FreeBSD.ORG>
3294833Sbr * All rights reserved.
4294833Sbr *
5294833Sbr * Redistribution and use in source and binary forms, with or without
6294833Sbr * modification, are permitted provided that the following conditions
7294833Sbr * are met:
8294833Sbr * 1. Redistributions of source code must retain the above copyright
9294833Sbr *    notice, this list of conditions and the following disclaimer.
10294833Sbr * 2. Redistributions in binary form must reproduce the above copyright
11294833Sbr *    notice, this list of conditions and the following disclaimer in the
12294833Sbr *    documentation and/or other materials provided with the distribution.
13294833Sbr *
14294833Sbr * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15294833Sbr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16294833Sbr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17294833Sbr * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18294833Sbr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19294833Sbr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20294833Sbr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21294833Sbr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22294833Sbr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23294833Sbr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24294833Sbr * SUCH DAMAGE.
25294833Sbr *
26294833Sbr * $FreeBSD: releng/11.0/lib/msun/riscv/fenv.c 294833 2016-01-26 14:40:41Z br $
27294833Sbr */
28294833Sbr
29294833Sbr#define	__fenv_static
30294833Sbr#include "fenv.h"
31294833Sbr
32294833Sbr#ifdef __GNUC_GNU_INLINE__
33294833Sbr#error "This file must be compiled with C99 'inline' semantics"
34294833Sbr#endif
35294833Sbr
36294833Sbr/*
37294833Sbr * Hopefully the system ID byte is immutable, so it's valid to use
38294833Sbr * this as a default environment.
39294833Sbr */
40294833Sbrconst fenv_t __fe_dfl_env = 0;
41294833Sbr
42294833Sbrextern inline int feclearexcept(int __excepts);
43294833Sbrextern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts);
44294833Sbrextern inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts);
45294833Sbrextern inline int feraiseexcept(int __excepts);
46294833Sbrextern inline int fetestexcept(int __excepts);
47294833Sbrextern inline int fegetround(void);
48294833Sbrextern inline int fesetround(int __round);
49294833Sbrextern inline int fegetenv(fenv_t *__envp);
50294833Sbrextern inline int feholdexcept(fenv_t *__envp);
51294833Sbrextern inline int fesetenv(const fenv_t *__envp);
52294833Sbrextern inline int feupdateenv(const fenv_t *__envp);
53