]> gcc.gnu.org Git - gcc.git/blame - libgcc/floatunsisf.c
MAINTAINERS: Change my email address as maintainer.
[gcc.git] / libgcc / floatunsisf.c
CommitLineData
2a3ebe77
JM
1/* Public domain. */
2typedef int SItype __attribute__ ((mode (SI)));
3typedef unsigned int USItype __attribute__ ((mode (SI)));
4typedef float SFtype __attribute__ ((mode (SF)));
5
6SFtype
7__floatunsisf (USItype u)
8{
9 SItype s = (SItype) u;
10 if (s < 0)
11 {
12 /* As in expand_float, compute (u & 1) | (u >> 1) to ensure
13 correct rounding if a nonzero bit is shifted out. */
14 return (SFtype) 2.0 * (SFtype) (SItype) ((u & 1) | (u >> 1));
15 }
16 else
17 return (SFtype) s;
18}
This page took 2.061166 seconds and 5 git commands to generate.