133b8a553SYi Kong //===----- lib/fp_mode.c - 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 provides a default implementation of fp_mode.h for architectures 1033b8a553SYi Kong // that does not support or does not have an implementation of floating point 1133b8a553SYi Kong // environment mode. 1233b8a553SYi Kong // 1333b8a553SYi Kong //===----------------------------------------------------------------------===// 1433b8a553SYi Kong 1533b8a553SYi Kong #include "fp_mode.h" 1633b8a553SYi Kong 1733b8a553SYi Kong // IEEE-754 default rounding (to nearest, ties to even). __fe_getround(void)18*40ef3e6dSAaron BallmanCRT_FE_ROUND_MODE __fe_getround(void) { return CRT_FE_TONEAREST; } 1933b8a553SYi Kong __fe_raise_inexact(void)20*40ef3e6dSAaron Ballmanint __fe_raise_inexact(void) { 2133b8a553SYi Kong return 0; 2233b8a553SYi Kong } 23