xref: /freebsd/contrib/llvm-project/compiler-rt/lib/builtins/fixunssfsi.c (revision 0b57cec536236d46e3dba9bd041533462f33dbb7)
1 //===-- fixunssfsi.c - Implement __fixunssfsi -----------------------------===//
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 __fixunssfsi for the compiler_rt library.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #define SINGLE_PRECISION
14 #include "fp_lib.h"
15 typedef su_int fixuint_t;
16 #include "fp_fixuint_impl.inc"
17 
__fixunssfsi(fp_t a)18 COMPILER_RT_ABI su_int __fixunssfsi(fp_t a) { return __fixuint(a); }
19 
20 #if defined(__ARM_EABI__)
21 #if defined(COMPILER_RT_ARMHF_TARGET)
__aeabi_f2uiz(fp_t a)22 AEABI_RTABI su_int __aeabi_f2uiz(fp_t a) { return __fixunssfsi(a); }
23 #else
24 COMPILER_RT_ALIAS(__fixunssfsi, __aeabi_f2uiz)
25 #endif
26 #endif
27