fp_mode.h 852 B

1234567891011121314151617181920212223242526272829
  1. //===----- lib/fp_mode.h - 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 is not part of the interface of this library.
  10. //
  11. // This file defines an interface for accessing hardware floating point
  12. // environment mode.
  13. //
  14. //===----------------------------------------------------------------------===//
  15. #ifndef FP_MODE_H
  16. #define FP_MODE_H
  17. typedef enum {
  18. CRT_FE_TONEAREST,
  19. CRT_FE_DOWNWARD,
  20. CRT_FE_UPWARD,
  21. CRT_FE_TOWARDZERO
  22. } CRT_FE_ROUND_MODE;
  23. CRT_FE_ROUND_MODE __fe_getround(void);
  24. int __fe_raise_inexact(void);
  25. #endif // FP_MODE_H