1 /* ===-- fixunssfdi.c - Implement __fixunssfdi -----------------------------===
3 * The LLVM Compiler Infrastructure
5 * This file is dual licensed under the MIT and the University of Illinois Open
6 * Source Licenses. See LICENSE.TXT for details.
8 * ===----------------------------------------------------------------------===
11 #define SINGLE_PRECISION
14 ARM_EABI_FNALIAS(f2ulz, fixunssfdi)
17 /* Support for systems that have hardware floating-point; can set the invalid
18 * flag as a side-effect of computation.
21 COMPILER_RT_ABI du_int
24 if (a <= 0.0f) return 0;
26 su_int high = da/0x1p32f;
27 su_int low = da - (double)high*0x1p32f;
28 return ((du_int)high << 32) | low;
32 /* Support for systems that don't have hardware floating-point; there are no
33 * flags to set, and we don't want to code-gen to an unknown soft-float
37 typedef du_int fixuint_t;
38 #include "fp_fixuint_impl.inc"
40 COMPILER_RT_ABI du_int
41 __fixunssfdi(fp_t a) {