Bionic: Aliasing problems with frexpf

This patch fixes a known bug in bionic libm
due to aliasing issues in gcc 4.2 and 4.4; more
specifically in frexpf.

The function frexpf is used to extract the
mantissa and exponent from a double precision number.

The bug has already been reported here:
https://code.google.com/p/android/issues/detail?id=6697

Change-Id: I2e1f2e0a45906642d2225b9d150ed391d2bf331c
Signed-off-by: Rodrigo Obregon <robregon@ti.com>
This commit is contained in:
Rodrigo Obregon 2010-11-05 12:15:26 -05:00
parent 96c03c7dcc
commit fddaafceda

View File

@ -39,6 +39,6 @@ frexpf(float x, int *eptr)
} }
*eptr += (ix>>23)-126; *eptr += (ix>>23)-126;
hx = (hx&0x807fffff)|0x3f000000; hx = (hx&0x807fffff)|0x3f000000;
*(int*)&x = hx; SET_FLOAT_WORD(x,hx);
return x; return x;
} }