xref: /freebsd/contrib/llvm-project/compiler-rt/lib/builtins/floattisf.c (revision 5f757f3ff9144b609b3c433dfd370cc6bdc191ad)
10b57cec5SDimitry Andric //===-- floattisf.c - Implement __floattisf -------------------------------===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric //
90b57cec5SDimitry Andric // This file implements __floattisf for the compiler_rt library.
100b57cec5SDimitry Andric //
110b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
120b57cec5SDimitry Andric 
130b57cec5SDimitry Andric #include "int_lib.h"
140b57cec5SDimitry Andric 
150b57cec5SDimitry Andric #ifdef CRT_HAS_128BIT
160b57cec5SDimitry Andric 
17*5f757f3fSDimitry Andric #define SRC_I128
18*5f757f3fSDimitry Andric #define DST_SINGLE
19*5f757f3fSDimitry Andric #include "int_to_fp_impl.inc"
20*5f757f3fSDimitry Andric 
210b57cec5SDimitry Andric // Returns: convert a to a float, rounding toward even.
220b57cec5SDimitry Andric 
230b57cec5SDimitry Andric // Assumption: float is a IEEE 32 bit floating point type
240b57cec5SDimitry Andric //             ti_int is a 128 bit integral type
250b57cec5SDimitry Andric 
260b57cec5SDimitry Andric // seee eeee emmm mmmm mmmm mmmm mmmm mmmm
270b57cec5SDimitry Andric 
28*5f757f3fSDimitry Andric COMPILER_RT_ABI float __floattisf(ti_int a) { return __floatXiYf__(a); }
290b57cec5SDimitry Andric 
300b57cec5SDimitry Andric #endif // CRT_HAS_128BIT
31