]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/gcc/config/floatundidf.c
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / gcc / config / floatundidf.c
1 /* Public domain.  */
2 typedef unsigned int USItype __attribute__ ((mode (SI)));
3 typedef unsigned int UDItype __attribute__ ((mode (DI)));
4 typedef float DFtype __attribute__ ((mode (DF)));
5
6 DFtype __floatundidf (UDItype);
7
8 DFtype
9 __floatundidf (UDItype u)
10 {
11   /* When the word size is small, we never get any rounding error.  */
12   DFtype f = (USItype) (u >> (sizeof (USItype) * 8));
13   f *= 0x1p32f;
14   f += (USItype) u;
15   return f;
16 }