801bc563 | 13-Apr-2018 |
Alex Bennée <alex.bennee@linaro.org> |
fpu/softfloat: raise float_invalid for NaN/Inf in round_to_int_and_pack
The re-factor broke the raising of INVALID when NaN/Inf is passed to the float_to_int conversion functions. round_to_uint_and_
fpu/softfloat: raise float_invalid for NaN/Inf in round_to_int_and_pack
The re-factor broke the raising of INVALID when NaN/Inf is passed to the float_to_int conversion functions. round_to_uint_and_pack got this right for NaN but also missed out the Inf handling.
Fixes https://bugs.launchpad.net/qemu/+bug/1759264
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Tested-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20180413140334.26622-3-alex.bennee@linaro.org Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
6245327a | 13-Apr-2018 |
Emilio G. Cota <cota@braap.org> |
softfloat: fix {min, max}nummag for same-abs-value inputs
Before 8936006 ("fpu/softfloat: re-factor minmax", 2018-02-21), we used to return +Zero for maxnummag(-Zero,+Zero); after that commit, we re
softfloat: fix {min, max}nummag for same-abs-value inputs
Before 8936006 ("fpu/softfloat: re-factor minmax", 2018-02-21), we used to return +Zero for maxnummag(-Zero,+Zero); after that commit, we return -Zero.
Fix it by making {min,max}nummag consistent with {min,max}num, deferring to the latter when the absolute value of the operands is the same.
With this fix we now pass fp-test.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 20180413140334.26622-2-alex.bennee@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
c13bb2da | 12-Jan-2018 |
Alex Bennée <alex.bennee@linaro.org> |
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
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>
show more ...
|
0c4c9092 | 05-Dec-2017 |
Alex Bennée <alex.bennee@linaro.org> |
fpu/softfloat: re-factor compare
The compare function was already expanded from a macro. I keep the macro expansion but move most of the logic into a compare_decomposed.
Signed-off-by: Alex Bennée
fpu/softfloat: re-factor compare
The compare function was already expanded from a macro. I keep the macro expansion but move most of the logic into a compare_decomposed.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
89360067 | 05-Dec-2017 |
Alex Bennée <alex.bennee@linaro.org> |
fpu/softfloat: re-factor minmax
Let's do the same re-factor treatment for minmax functions. I still use the MACRO trick to expand but now all the checking code is common.
Signed-off-by: Alex Bennée
fpu/softfloat: re-factor minmax
Let's do the same re-factor treatment for minmax functions. I still use the MACRO trick to expand but now all the checking code is common.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
0bfc9f19 | 30-Nov-2017 |
Alex Bennée <alex.bennee@linaro.org> |
fpu/softfloat: re-factor scalbn
This is one of the simpler manipulations you could make to a floating point number.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderso
fpu/softfloat: re-factor scalbn
This is one of the simpler manipulations you could make to a floating point number.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
c02e1fb8 | 30-Nov-2017 |
Alex Bennée <alex.bennee@linaro.org> |
fpu/softfloat: re-factor int/uint to float
These are considerably simpler as the lower order integers can just use the higher order conversion function. As the decomposed fractional part is a full 6
fpu/softfloat: re-factor int/uint to float
These are considerably simpler as the lower order integers can just use the higher order conversion function. As the decomposed fractional part is a full 64 bit rounding and inexact handling comes from the pack functions.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
ab52f973 | 29-Nov-2017 |
Alex Bennée <alex.bennee@linaro.org> |
fpu/softfloat: re-factor float to int/uint
We share the common int64/uint64_pack_decomposed function across all the helpers and simply limit the final result depending on the final size.
Signed-off
fpu/softfloat: re-factor float to int/uint
We share the common int64/uint64_pack_decomposed function across all the helpers and simply limit the final result depending on the final size.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
dbe4d53a | 29-Nov-2017 |
Alex Bennée <alex.bennee@linaro.org> |
fpu/softfloat: re-factor round_to_int
We can now add float16_round_to_int and use the common round_decomposed and canonicalize functions to have a single implementation for float16/32/64 round_to_in
fpu/softfloat: re-factor round_to_int
We can now add float16_round_to_int and use the common round_decomposed and canonicalize functions to have a single implementation for float16/32/64 round_to_int functions.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
d446830a | 28-Nov-2017 |
Alex Bennée <alex.bennee@linaro.org> |
fpu/softfloat: re-factor muladd
We can now add float16_muladd and use the common decompose and canonicalize functions to have a single implementation for float16/32/64 muladd functions.
Signed-off-
fpu/softfloat: re-factor muladd
We can now add float16_muladd and use the common decompose and canonicalize functions to have a single implementation for float16/32/64 muladd functions.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
cf07323d | 27-Nov-2017 |
Alex Bennée <alex.bennee@linaro.org> |
fpu/softfloat: re-factor div
We can now add float16_div and use the common decompose and canonicalize functions to have a single implementation for float16/32/64 versions.
Signed-off-by: Alex Benné
fpu/softfloat: re-factor div
We can now add float16_div and use the common decompose and canonicalize functions to have a single implementation for float16/32/64 versions.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
74d707e2 | 07-Dec-2017 |
Alex Bennée <alex.bennee@linaro.org> |
fpu/softfloat: re-factor mul
We can now add float16_mul and use the common decompose and canonicalize functions to have a single implementation for float16/32/64 versions.
Signed-off-by: Alex Benné
fpu/softfloat: re-factor mul
We can now add float16_mul and use the common decompose and canonicalize functions to have a single implementation for float16/32/64 versions.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
6fff2167 | 27-Nov-2017 |
Alex Bennée <alex.bennee@linaro.org> |
fpu/softfloat: re-factor add/sub
We can now add float16_add/sub and use the common decompose and canonicalize functions to have a single implementation for float16/32/64 add and sub functions.
Sign
fpu/softfloat: re-factor add/sub
We can now add float16_add/sub and use the common decompose and canonicalize functions to have a single implementation for float16/32/64 add and sub functions.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
show more ...
|
a90119b5 | 27-Nov-2017 |
Alex Bennée <alex.bennee@linaro.org> |
fpu/softfloat: define decompose structures
These structures pave the way for generic softfloat helper routines that will operate on fully decomposed numbers.
Signed-off-by: Alex Bennée <alex.bennee
fpu/softfloat: define decompose structures
These structures pave the way for generic softfloat helper routines that will operate on fully decomposed numbers.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
show more ...
|
d97544c9 | 27-Nov-2017 |
Alex Bennée <alex.bennee@linaro.org> |
fpu/softfloat: move the extract functions to the top of the file
This is pure code-motion during re-factoring as the helpers will be needed earlier.
Signed-off-by: Alex Bennée <alex.bennee@linaro.o
fpu/softfloat: move the extract functions to the top of the file
This is pure code-motion during re-factoring as the helpers will be needed earlier.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|