1 /* ===-- fixunssfdi.c - Implement __fixunssfdi -----------------------------===
2  *
3  *                     The LLVM Compiler Infrastructure
4  *
5  * This file is dual licensed under the MIT and the University of Illinois Open
6  * Source Licenses. See LICENSE.TXT for details.
7  *
8  * ===----------------------------------------------------------------------===
9  */
10 
11 #include "int_lib.h"
12 
13 du_int __aeabi_f2ulz(float a);
14 
15 /* Support for systems that have hardware floating-point; can set the invalid
16  * flag as a side-effect of computation.
17  */
18 
19 du_int
__aeabi_f2ulz(float a)20 __aeabi_f2ulz(float a)
21 {
22     if (a <= 0.0f) return 0;
23     float da = a;
24     su_int high = da / 4294967296.f;               /* da / 0x1p32f; */
25     su_int low = da - (float)high * 4294967296.f; /* high * 0x1p32f; */
26     return ((du_int)high << 32) | low;
27 }
28