[PATCH v2 0/1] Fix qemu_strtosz regression

Richard Henderson posted 1 patch 3 years, 1 month ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210315155835.1970210-1-richard.henderson@linaro.org
tests/unit/test-cutils.c |  2 +-
util/cutils.c            | 50 ++++++++++++++++++++++++++++------------
2 files changed, 36 insertions(+), 16 deletions(-)
[PATCH v2 0/1] Fix qemu_strtosz regression
Posted by Richard Henderson 3 years, 1 month ago
Supercedes: 20210314234821.1954428-1-richard.henderson@linaro.org
("utils: Use fma in qemu_strtosz")

On second thoughts, using fma isn't the best workaround.

Let's just do some fixed-point arithmetic and compute the exact
result of the multiply.  This makes overflow detection simple
and obvious.

Round up from 0.5, because.  This fixes one testsuite failure
and causes another, so amend the testsuite.


r~


Richard Henderson (1):
  utils: Use fixed-point arithmetic in qemu_strtosz

 tests/unit/test-cutils.c |  2 +-
 util/cutils.c            | 50 ++++++++++++++++++++++++++++------------
 2 files changed, 36 insertions(+), 16 deletions(-)

-- 
2.25.1