* libm/common/sf_llrint.c, libm/common/sf_round.c: Add explicit casts
to __uint32_t to avoid overflows on implicit casts.
This commit is contained in:
parent
a26a5332da
commit
98b2b9cf57
|
@ -1,3 +1,8 @@
|
||||||
|
2010-10-08 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||||
|
|
||||||
|
* libm/common/sf_llrint.c, libm/common/sf_round.c: Add explicit casts
|
||||||
|
to __uint32_t to avoid overflows on implicit casts.
|
||||||
|
|
||||||
2010-10-08 Ralf Corsépius <ralf.corsepius@rtems.org>
|
2010-10-08 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||||
|
|
||||||
* libm/complex/complex.tex: Add empty stub.
|
* libm/complex/complex.tex: Add empty stub.
|
||||||
|
|
|
@ -71,7 +71,7 @@ TWO23[2]={
|
||||||
GET_FLOAT_WORD (i0, t);
|
GET_FLOAT_WORD (i0, t);
|
||||||
/* Detect the all-zeros representation of plus and
|
/* Detect the all-zeros representation of plus and
|
||||||
minus zero, which fails the calculation below. */
|
minus zero, which fails the calculation below. */
|
||||||
if ((i0 & ~(1 << 31)) == 0)
|
if ((i0 & ~((__uint32_t)1 << 31)) == 0)
|
||||||
return 0;
|
return 0;
|
||||||
j0 = ((i0 >> 23) & 0xff) - 0x7f;
|
j0 = ((i0 >> 23) & 0xff) - 0x7f;
|
||||||
i0 &= 0x7fffff;
|
i0 &= 0x7fffff;
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
w &= 0x80000000;
|
w &= 0x80000000;
|
||||||
if (exponent_less_127 == -1)
|
if (exponent_less_127 == -1)
|
||||||
/* Result is +1.0 or -1.0. */
|
/* Result is +1.0 or -1.0. */
|
||||||
w |= (127 << 23);
|
w |= ((__uint32_t)127 << 23);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue