From: <gb...@di...> - 2000-08-16 22:40:08
|
Hi, > Yes, the CVS sources still have that problem. I applied Lauri's changes to > uae_cpu/fpp.cpp, but nothing more. I have just tried to remove the assembly type conversion functions, especially (only in fact) to_single() and restore the original one in C from uae_cpu/fpp.cpp. Scrollbars stopped to work again. The problem is that there is no check for NaN, Inf and Zero. So, if the exponent is set to the maximum (possibly a NaN of Inf), doing exponent + FP_DOUBLE(or EXTENDED)_EXP_BIAS - FP_SINGLE_EXP_BIAS without extra tests is not correct. I fixed it by assigning each part of the floating-point value through a fp_single_shape type (32-bit float). Maybe something like hereunder mentioned would work as well: function::to_single() union { fp_single as_single; uae_u32 as_uint32; } fp_loader; fp_loader.as_uint32 = byteswap(value); return (fp_extended)fp_loader.as_single; Hmm, actually, I tried to apply it on the CVS sources, this didn't work. But it does with my current changes in fpu_ieee.cpp. i.e. only to_single() is reimplemented in C++. BTW, I also got inspired from binutils-2.x.x/libiberty/floatformat.c. Unfortunately, the diffs I tried did not work... PS: I reuploaded the file fpu_ieee.cpp on my website. PPS: Christian, would it be possible to tell the mailing-list manager (or whatsoever) to automatically add a Reply-To: <this_list> field ? Thanks. -- Gwenolé Beauchesne |