xref: /llvm-project/compiler-rt/lib/builtins/fp_mode.h (revision c2cc70e4f534f445693d4ffb6fb8955c3e0bc2be)
133b8a553SYi Kong //===----- lib/fp_mode.h - Floaing-point environment mode utilities --C -*-===//
233b8a553SYi Kong //
333b8a553SYi Kong // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
433b8a553SYi Kong // See https://llvm.org/LICENSE.txt for license information.
533b8a553SYi Kong // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
633b8a553SYi Kong //
733b8a553SYi Kong //===----------------------------------------------------------------------===//
833b8a553SYi Kong //
933b8a553SYi Kong // This file is not part of the interface of this library.
1033b8a553SYi Kong //
1133b8a553SYi Kong // This file defines an interface for accessing hardware floating point
1233b8a553SYi Kong // environment mode.
1333b8a553SYi Kong //
1433b8a553SYi Kong //===----------------------------------------------------------------------===//
1533b8a553SYi Kong 
16*c2cc70e4SQiu Chaofan #ifndef FP_MODE_H
17*c2cc70e4SQiu Chaofan #define FP_MODE_H
1833b8a553SYi Kong 
1933b8a553SYi Kong typedef enum {
20ed0bf875SAlex Richardson   CRT_FE_TONEAREST,
21ed0bf875SAlex Richardson   CRT_FE_DOWNWARD,
22ed0bf875SAlex Richardson   CRT_FE_UPWARD,
23ed0bf875SAlex Richardson   CRT_FE_TOWARDZERO
24ed0bf875SAlex Richardson } CRT_FE_ROUND_MODE;
2533b8a553SYi Kong 
26ed0bf875SAlex Richardson CRT_FE_ROUND_MODE __fe_getround(void);
27d9e56918SAyke van Laethem int __fe_raise_inexact(void);
2833b8a553SYi Kong 
2933b8a553SYi Kong #endif // FP_MODE_H
30