floatuntisf.c 946 B

123456789101112131415161718192021222324252627282930
  1. //===-- floatuntisf.c - Implement __floatuntisf ---------------------------===//
  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 implements __floatuntisf for the compiler_rt library.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. #include "int_lib.h"
  13. #ifdef CRT_HAS_128BIT
  14. #define SRC_U128
  15. #define DST_SINGLE
  16. #include "int_to_fp_impl.inc"
  17. // Returns: convert a to a float, rounding toward even.
  18. // Assumption: float is a IEEE 32 bit floating point type
  19. // tu_int is a 128 bit integral type
  20. // seee eeee emmm mmmm mmmm mmmm mmmm mmmm
  21. COMPILER_RT_ABI float __floatuntisf(tu_int a) { return __floatXiYf__(a); }
  22. #endif // CRT_HAS_128BIT