]>
git.proxmox.com Git - mirror_edk2.git/blob - StdLib/Include/Arm/machine/ieeefp.h
1 /* $NetBSD: ieeefp.h,v 1.3 2013/04/23 05:42:23 matt Exp $ */
4 * Copyright (c) 2013 - 2014, ARM Limited. All rights reserved.
6 * This program and the accompanying materials
7 * are licensed and made available under the terms and conditions of the BSD License
8 * which accompanies this distribution. The full text of the license may be found at
9 * http://opensource.org/licenses/bsd-license.php
11 * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 * Based on ieeefp.h written by J.T. Conklin, Apr 28, 1995
20 #ifndef _ARM_IEEEFP_H_
21 #define _ARM_IEEEFP_H_
23 #include <LibConfig.h>
24 #include <sys/featuretest.h>
26 #if defined(_NETBSD_SOURCE) || defined(_ISOC99_SOURCE)
28 //#include <arm/fenv.h>
29 #include <machine/fenv.h>
31 #if !defined(_ISOC99_SOURCE)
33 /* Exception type (used by fpsetmask() et al.) */
35 typedef int fp_except
;
37 /* Bit defines for fp_except */
39 #define FP_X_INV FE_INVALID /* invalid operation exception */
40 #define FP_X_DZ FE_DIVBYZERO /* divide-by-zero exception */
41 #define FP_X_OFL FE_OVERFLOW /* overflow exception */
42 #define FP_X_UFL FE_UNDERFLOW /* underflow exception */
43 #define FP_X_IMP FE_INEXACT /* imprecise (prec. loss; "inexact") */
48 FP_RN
=FE_TONEAREST
, /* round to nearest representable number */
49 FP_RP
=FE_UPWARD
, /* round toward positive infinity */
50 FP_RM
=FE_DOWNWARD
, /* round toward negative infinity */
51 FP_RZ
=FE_TOWARDZERO
/* round to zero (truncate) */
54 #endif /* !_ISOC99_SOURCE */
56 #endif /* _NETBSD_SOURCE || _ISOC99_SOURCE */
58 #endif /* _ARM_IEEEFP_H_ */