xref: /freebsd/contrib/llvm-project/compiler-rt/lib/builtins/fixsfti.c (revision 25ecdc7d52770caf1c9b44b5ec11f468f6b636f3)
1 //===-- fixsfti.c - Implement __fixsfti -----------------------------------===//
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 #include "int_lib.h"
10 
11 #ifdef CRT_HAS_128BIT
12 #define SINGLE_PRECISION
13 #include "fp_lib.h"
14 
15 typedef ti_int fixint_t;
16 typedef tu_int fixuint_t;
17 #include "fp_fixint_impl.inc"
18 
19 COMPILER_RT_ABI ti_int __fixsfti(fp_t a) { return __fixint(a); }
20 
21 #endif // CRT_HAS_128BIT
22