]>
git.proxmox.com Git - mirror_edk2.git/blob - StdLib/Include/Arm/machine/fenv.h
1 /* $NetBSD: fenv.h,v 1.2 2014/01/29 00:22:09 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
23 #ifdef __ARM_PCS_AAPCS64
24 /* AArch64 split FPSCR into two registers FPCR and FPSR */
30 typedef int fenv_t
; /* FPSCR */
32 typedef int fexcept_t
;
34 #define FE_INVALID 0x01 /* invalid operation exception */
35 #define FE_DIVBYZERO 0x02 /* divide-by-zero exception */
36 #define FE_OVERFLOW 0x04 /* overflow exception */
37 #define FE_UNDERFLOW 0x08 /* underflow exception */
38 #define FE_INEXACT 0x10 /* imprecise (loss of precision; "inexact") */
40 #define FE_ALL_EXCEPT 0x1f
42 #define FE_TONEAREST 0 /* round to nearest representable number */
43 #define FE_UPWARD 1 /* round toward positive infinity */
44 #define FE_DOWNWARD 2 /* round toward negative infinity */
45 #define FE_TOWARDZERO 3 /* round to zero (truncate) */
49 /* Default floating-point environment */
50 extern const fenv_t __fe_dfl_env
;
51 #define FE_DFL_ENV (&__fe_dfl_env)
55 #endif /* _ARM_FENV_H_ */