xref: /freebsd-src/contrib/llvm-project/compiler-rt/lib/builtins/fp_mode.c (revision 81ad626541db97eb356e2c1d4a20eb2a26a766ab)
168d75effSDimitry Andric //===----- lib/fp_mode.c - Floaing-point environment mode utilities --C -*-===//
268d75effSDimitry Andric //
368d75effSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
468d75effSDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
568d75effSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
668d75effSDimitry Andric //
768d75effSDimitry Andric //===----------------------------------------------------------------------===//
868d75effSDimitry Andric //
968d75effSDimitry Andric // This file provides a default implementation of fp_mode.h for architectures
1068d75effSDimitry Andric // that does not support or does not have an implementation of floating point
1168d75effSDimitry Andric // environment mode.
1268d75effSDimitry Andric //
1368d75effSDimitry Andric //===----------------------------------------------------------------------===//
1468d75effSDimitry Andric 
1568d75effSDimitry Andric #include "fp_mode.h"
1668d75effSDimitry Andric 
1768d75effSDimitry Andric // IEEE-754 default rounding (to nearest, ties to even).
__fe_getround(void)18*81ad6265SDimitry Andric CRT_FE_ROUND_MODE __fe_getround(void) { return CRT_FE_TONEAREST; }
1968d75effSDimitry Andric 
__fe_raise_inexact(void)20*81ad6265SDimitry Andric int __fe_raise_inexact(void) {
2168d75effSDimitry Andric   return 0;
2268d75effSDimitry Andric }
23