fpu/softfloat: re-factor sqrt
commitc13bb2da9eedfbc5886c8048df1bc1114b285fb0
authorAlex Bennée <alex.bennee@linaro.org>
Fri, 12 Jan 2018 11:24:02 +0000 (12 11:24 +0000)
committerAlex Bennée <alex.bennee@linaro.org>
Wed, 21 Feb 2018 10:21:54 +0000 (21 10:21 +0000)
tree06ddb15da5ae722dd67c9a9484b9741185146824
parent0c4c90929143a530730e2879204a55a30bf63758
fpu/softfloat: re-factor sqrt

This is a little bit of a departure from softfloat's original approach
as we skip the estimate step in favour of a straight iteration. There
is a minor optimisation to avoid calculating more bits of precision
than we need however this still brings a performance drop, especially
for float64 operations.

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
fpu/softfloat.c
include/fpu/softfloat.h