cabd91c3bb
The attached change fixes a float conversion problem found running the GCC testsuite with GCC configured with --with-arch=2.0. The actual problem occurs for an exponent value of 63. This is the maximum exponent value that can be passed. This causes a left shift by 32 in the else hunk of the macro. This causes undefined behavior and the wrong value is returned for dresultB. The fix is the check "exponent <= 62". If the exponent is 63, dresultB is set to 0. The patch also optimizes the operation a bit by copying "Sall(sgl_value) << SGL_EXP_LENGTH" to val, so that sgl_value is not modified. Signed-off-by: John David Anglin <dave.anglin@bell.net> Signed-off-by: Helge Deller <deller@gmx.de> |
||
---|---|---|
.. | ||
cnv_float.h | ||
dbl_float.h | ||
decode_exc.c | ||
denormal.c | ||
dfadd.c | ||
dfcmp.c | ||
dfdiv.c | ||
dfmpy.c | ||
dfrem.c | ||
dfsqrt.c | ||
dfsub.c | ||
driver.c | ||
fcnvff.c | ||
fcnvfu.c | ||
fcnvfut.c | ||
fcnvfx.c | ||
fcnvfxt.c | ||
fcnvuf.c | ||
fcnvxf.c | ||
float.h | ||
fmpyfadd.c | ||
fpbits.h | ||
fpu.h | ||
fpudispatch.c | ||
frnd.c | ||
hppa.h | ||
Makefile | ||
math-emu.h | ||
README | ||
sfadd.c | ||
sfcmp.c | ||
sfdiv.c | ||
sfmpy.c | ||
sfrem.c | ||
sfsqrt.c | ||
sfsub.c | ||
sgl_float.h |
All files except driver.c are snapshots from the HP-UX kernel. They've been modified as little as possible. Even though they don't fit the Linux coding style, please leave them in their funny format just in case someone in the future, with access to HP-UX source code, is generous enough to update our copies with later changes from HP-UX -- it'll make their 'diff' job easier if our code is relatively unmodified. Required Disclaimer: Hewlett-Packard makes no implied or expressed warranties about this code nor any promises to maintain or test it in any way. This copy of this snapshot is no longer the property of Hewlett-Packard.