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