1/* Public domain. */ 2typedef unsigned int USItype __attribute__ ((mode (SI))); 3typedef int DItype __attribute__ ((mode (DI))); 4typedef unsigned int UDItype __attribute__ ((mode (DI))); 5typedef float SFtype __attribute__ ((mode (SF))); 6typedef float DFtype __attribute__ ((mode (DF))); 7 8DItype __fixsfdi (SFtype); 9 10/* This version is needed to prevent recursion; fixunssfdi in libgcc 11 calls fixsfdi, which in turn calls calls fixunssfdi. */ 12 13static DItype 14local_fixunssfdi (SFtype original_a) 15{ 16 DFtype a = original_a; 17 USItype hi, lo; 18 19 hi = a / (((UDItype) 1) << (sizeof (USItype) * 8)); 20 lo = a - ((DFtype) hi) * (((UDItype) 1) << (sizeof (USItype) * 8)); 21 return ((UDItype) hi << (sizeof (USItype) * 8)) | lo; 22} 23 24DItype 25__fixsfdi (SFtype a) 26{ 27 if (a < 0) 28 return - local_fixunssfdi (-a); 29 return local_fixunssfdi (a); 30} 31