xref: /freebsd/contrib/llvm-project/compiler-rt/lib/builtins/fp_mode.c (revision 02e9120893770924227138ba49df1edb3896112a)
1 //===----- lib/fp_mode.c - Floaing-point environment mode utilities --C -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file provides a default implementation of fp_mode.h for architectures
10 // that does not support or does not have an implementation of floating point
11 // environment mode.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #include "fp_mode.h"
16 
17 // IEEE-754 default rounding (to nearest, ties to even).
18 CRT_FE_ROUND_MODE __fe_getround(void) { return CRT_FE_TONEAREST; }
19 
20 int __fe_raise_inexact(void) {
21   return 0;
22 }
23