1169689Skan/* Public domain. */ 2169689Skantypedef int SItype __attribute__ ((mode (SI))); 3169689Skantypedef unsigned int USItype __attribute__ ((mode (SI))); 4169689Skantypedef float SFtype __attribute__ ((mode (SF))); 5169689Skan 6169689SkanSFtype 7169689Skan__floatunsisf (USItype u) 8169689Skan{ 9169689Skan SItype s = (SItype) u; 10169689Skan if (s < 0) 11169689Skan { 12169689Skan /* As in expand_float, compute (u & 1) | (u >> 1) to ensure 13169689Skan correct rounding if a nonzero bit is shifted out. */ 14169689Skan return (SFtype) 2.0 * (SFtype) (SItype) ((u & 1) | (u >> 1)); 15169689Skan } 16169689Skan else 17169689Skan return (SFtype) s; 18169689Skan} 19