blob: eca2916a5c88fea17e65104a9ad6c1c6aa153b9e [file] [log] [blame]
Edward O'Callaghan4856eef2009-08-05 04:02:56 +00001/* ===-- fixunssfsi.c - Implement __fixunssfsi -----------------------------===
2 *
3 * The LLVM Compiler Infrastructure
4 *
Howard Hinnant5b791f62010-11-16 22:13:33 +00005 * This file is dual licensed under the MIT and the University of Illinois Open
6 * Source Licenses. See LICENSE.TXT for details.
Edward O'Callaghan4856eef2009-08-05 04:02:56 +00007 *
8 * ===----------------------------------------------------------------------===
9 *
10 * This file implements __fixunssfsi for the compiler_rt library.
11 *
12 * ===----------------------------------------------------------------------===
13 */
Daniel Dunbarfd089992009-06-26 16:47:03 +000014
Joerg Sonnenberger91bd6982015-03-11 21:13:56 +000015#define SINGLE_PRECISION
16#include "fp_lib.h"
17typedef su_int fixuint_t;
18#include "fp_fixuint_impl.inc"
Daniel Dunbarfd089992009-06-26 16:47:03 +000019
Anton Korobeynikove63da932011-04-19 17:52:09 +000020COMPILER_RT_ABI su_int
Joerg Sonnenberger91bd6982015-03-11 21:13:56 +000021__fixunssfsi(fp_t a) {
22 return __fixuint(a);
Daniel Dunbarfd089992009-06-26 16:47:03 +000023}
Saleem Abdulrasool36ac5dd2017-05-16 16:41:37 +000024
25#if defined(__ARM_EABI__)
Eli Friedman0d586d02017-10-03 21:25:07 +000026#if defined(COMPILER_RT_ARMHF_TARGET)
Saleem Abdulrasool36ac5dd2017-05-16 16:41:37 +000027AEABI_RTABI su_int __aeabi_f2uiz(fp_t a) {
28 return __fixunssfsi(a);
29}
Eli Friedman0d586d02017-10-03 21:25:07 +000030#else
31AEABI_RTABI su_int __aeabi_f2uiz(fp_t a) COMPILER_RT_ALIAS(__fixunssfsi);
Saleem Abdulrasool36ac5dd2017-05-16 16:41:37 +000032#endif
Eli Friedman0d586d02017-10-03 21:25:07 +000033#endif