xref: /openbsd-src/gnu/llvm/compiler-rt/lib/builtins/fp_mode.c (revision 810390e339a5425391477d5d41c78d7cab2424ac)
13cab2bb3Spatrick //===----- lib/fp_mode.c - Floaing-point environment mode utilities --C -*-===//
23cab2bb3Spatrick //
33cab2bb3Spatrick // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
43cab2bb3Spatrick // See https://llvm.org/LICENSE.txt for license information.
53cab2bb3Spatrick // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
63cab2bb3Spatrick //
73cab2bb3Spatrick //===----------------------------------------------------------------------===//
83cab2bb3Spatrick //
93cab2bb3Spatrick // This file provides a default implementation of fp_mode.h for architectures
103cab2bb3Spatrick // that does not support or does not have an implementation of floating point
113cab2bb3Spatrick // environment mode.
123cab2bb3Spatrick //
133cab2bb3Spatrick //===----------------------------------------------------------------------===//
143cab2bb3Spatrick 
153cab2bb3Spatrick #include "fp_mode.h"
163cab2bb3Spatrick 
173cab2bb3Spatrick // IEEE-754 default rounding (to nearest, ties to even).
__fe_getround(void)18*810390e3Srobert CRT_FE_ROUND_MODE __fe_getround(void) { return CRT_FE_TONEAREST; }
193cab2bb3Spatrick 
__fe_raise_inexact(void)20*810390e3Srobert int __fe_raise_inexact(void) {
213cab2bb3Spatrick   return 0;
223cab2bb3Spatrick }
23