xref: /freebsd/contrib/llvm-project/compiler-rt/lib/builtins/fixsfsi.c (revision fe75646a0234a261c0013bf1840fdac4acaf0cec)
1 //===-- fixsfsi.c - Implement __fixsfsi -----------------------------------===//
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 #define SINGLE_PRECISION
10 #include "fp_lib.h"
11 typedef si_int fixint_t;
12 typedef su_int fixuint_t;
13 #include "fp_fixint_impl.inc"
14 
15 COMPILER_RT_ABI si_int __fixsfsi(fp_t a) { return __fixint(a); }
16 
17 #if defined(__ARM_EABI__)
18 #if defined(COMPILER_RT_ARMHF_TARGET)
19 AEABI_RTABI si_int __aeabi_f2iz(fp_t a) { return __fixsfsi(a); }
20 #else
21 COMPILER_RT_ALIAS(__fixsfsi, __aeabi_f2iz)
22 #endif
23 #endif
24