]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/gcc/config/fixunssfsi.c
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / gcc / config / fixunssfsi.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
6 USItype __fixunssfsi (SFtype);
7
8 #define SItype_MIN \
9   (- ((SItype) (((USItype) 1 << ((sizeof (SItype) * 8) - 1)) - 1)) - 1)
10
11 USItype
12 __fixunssfsi (SFtype a)
13 {
14   if (a >= - (SFtype) SItype_MIN)
15     return (SItype) (a + SItype_MIN) - SItype_MIN;
16   return (SItype) a;
17 }