summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPeter Maydell2014-01-07 18:17:50 +0100
committerPeter Maydell2014-01-08 20:07:22 +0100
commit3c85c37f254bdfaea4e105b5014a287b5cf9514b (patch)
tree672034d2444315ff640bd5d0297d6f0763aa2021 /include
parentsoftfloat: Only raise Invalid when conversions to int are out of range (diff)
downloadqemu-3c85c37f254bdfaea4e105b5014a287b5cf9514b.tar.gz
qemu-3c85c37f254bdfaea4e105b5014a287b5cf9514b.tar.xz
qemu-3c85c37f254bdfaea4e105b5014a287b5cf9514b.zip
softfloat: Fix factor 2 error for scalbn on denormal inputs
If the input to float*_scalbn() is denormal then it represents a number 0.[mantissabits] * 2^(1-exponentbias) (and the actual exponent field is all zeroes). This means that when we convert it to our unpacked encoding the unpacked exponent must be one greater than for a normal number, which represents 1.[mantissabits] * 2^(e-exponentbias) for an exponent field e. This meant we were giving answers too small by a factor of 2 for all denormal inputs. Note that the float-to-int routines also have this behaviour of not adjusting the exponent for denormals; however there it is harmless because denormals will all convert to integer zero anyway. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions