1 /* Copyright (C) 1998, 1999, 2000, 2004 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Alexandre Oliva <aoliva@redhat.com>
4 based on the corresponding file in the mips port.
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, write to the Free
18 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
22 # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
26 /* Define bits representing the exception. We use the EF bit
27 positions of the appropriate bits in the FPCR register. */
31 #define FE_INEXACT FE_INEXACT
33 #define FE_UNDERFLOW FE_UNDERFLOW
35 #define FE_OVERFLOW FE_OVERFLOW
37 #define FE_DIVBYZERO FE_DIVBYZERO
39 #define FE_INVALID FE_INVALID
42 #define FE_ALL_EXCEPT \
43 (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
45 /* The AM33/2.0 FPU supports only Round to nearest. Bits 3<<16 are
46 reserved to represent other rounding modes. */
49 FE_TONEAREST
= 0x00000,
50 #define FE_TONEAREST FE_TONEAREST
54 /* Type representing exception flags. */
55 typedef unsigned int fexcept_t
;
58 /* Type representing floating-point environment. */
59 typedef unsigned int fenv_t
;
61 /* If the default argument is used we use this value. */
62 #define FE_DFL_ENV ((__const fenv_t *) -1)
65 /* Floating-point environment where none of the exception is masked. */
66 # define FE_NOMASK_ENV ((__const fenv_t *) -2)