]>
git.ipfire.org Git - thirdparty/glibc.git/blob - ports/sysdeps/am33/fpu/bits/fenv.h
1 /* Copyright (C) 1998-2014 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, see
18 <http://www.gnu.org/licenses/>. */
21 # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
25 /* Define bits representing the exception. We use the EF bit
26 positions of the appropriate bits in the FPCR register. */
30 #define FE_INEXACT 0x01
33 #define FE_UNDERFLOW 0x02
36 #define FE_OVERFLOW 0x04
39 #define FE_DIVBYZERO 0x08
42 #define FE_INVALID 0x10
46 #define FE_ALL_EXCEPT \
47 (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
49 /* The AM33/2.0 FPU supports only Round to nearest. Bits 3<<16 are
50 reserved to represent other rounding modes. */
54 #define FE_TONEAREST 0x00000
59 /* Type representing exception flags. */
60 typedef unsigned int fexcept_t
;
63 /* Type representing floating-point environment. */
64 typedef unsigned int fenv_t
;
66 /* If the default argument is used we use this value. */
67 #define FE_DFL_ENV ((__const fenv_t *) -1)
70 /* Floating-point environment where none of the exception is masked. */
71 # define FE_NOMASK_ENV ((__const fenv_t *) -2)