]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/gcc/config/fixunsdfsi.c
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / gcc / config / fixunsdfsi.c
1 /* Public domain.  */
2 typedef unsigned int USItype __attribute__ ((mode (SI)));
3 typedef int SItype __attribute__ ((mode (SI)));
4 typedef float SFtype __attribute__ ((mode (SF)));
5 typedef float DFtype __attribute__ ((mode (DF)));
6
7 USItype __fixunsdfsi (DFtype);
8
9 #define SItype_MIN \
10   (- ((SItype) (((USItype) 1 << ((sizeof (SItype) * 8) - 1)) - 1)) - 1)
11
12 USItype
13 __fixunsdfsi (DFtype a)
14 {
15   if (a >= - (DFtype) SItype_MIN)
16     return (SItype) (a + SItype_MIN) - SItype_MIN;
17   return (SItype) a;
18 }