xref: /netbsd-src/sys/external/bsd/compiler_rt/dist/lib/builtins/fixunssfti.c (revision ef84fd3bd8895f4e6be1e38baf19e6dc3255bc64)
1156cd587Sjoerg /* ===-- fixunssfti.c - Implement __fixunssfti -----------------------------===
2156cd587Sjoerg  *
3156cd587Sjoerg  *                     The LLVM Compiler Infrastructure
4156cd587Sjoerg  *
5156cd587Sjoerg  * This file is dual licensed under the MIT and the University of Illinois Open
6156cd587Sjoerg  * Source Licenses. See LICENSE.TXT for details.
7156cd587Sjoerg  *
8156cd587Sjoerg  * ===----------------------------------------------------------------------===
9156cd587Sjoerg  *
10156cd587Sjoerg  * This file implements __fixunssfti for the compiler_rt library.
11156cd587Sjoerg  *
12156cd587Sjoerg  * ===----------------------------------------------------------------------===
13156cd587Sjoerg  */
14156cd587Sjoerg 
15*ef84fd3bSjoerg #define SINGLE_PRECISION
16*ef84fd3bSjoerg #include "fp_lib.h"
17156cd587Sjoerg 
18*ef84fd3bSjoerg #if defined(CRT_HAS_128BIT)
19*ef84fd3bSjoerg typedef tu_int fixuint_t;
20*ef84fd3bSjoerg #include "fp_fixuint_impl.inc"
21156cd587Sjoerg 
22f7f78b33Sjoerg COMPILER_RT_ABI tu_int
__fixunssfti(fp_t a)23*ef84fd3bSjoerg __fixunssfti(fp_t a) {
24*ef84fd3bSjoerg     return __fixuint(a);
25156cd587Sjoerg }
26*ef84fd3bSjoerg #endif
27