Skip to content

float: tests and bug fix for #5203

Alex Bennée qemu-arm qemu-devel qemu-riscv 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 9 repliesIn review
  2. v14 patches 6 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6meson: expose MESON_SOURCE_ROOT to scriptsmeson.build+1 -00 replies
2/6scripts/tests: add regen-reference.shscripts/tests/regen-reference.sh+87 -05 replies
3/6tests/tcg: extend the float_madds test casetests/tcg/aarch64/float_madds.ref tests/tcg/alpha/float_madds.ref tests/tcg/arm/float_madds.ref +17 more+1149 -02 replies
4/6fpu/softfloat: gate hardfloat on working fmaffpu/softfloat.c+10 -01 reply
5/6fpu: promote force_soft_fma to force_soft_floatfpu/softfloat.c include/fpu/softfloat.h+11 -131 reply
6/6tests/fp: add fp-test-hardtests/fp/fp-test-hard.c tests/fp/meson.build+722 -100 replies

Reviews trailers per patch

3 of 6 patches have a Reviewed-by or Acked-by.

PatchPierrick BouvierRichard Henderson
1/6R-b
2/6
3/6R-b
4/6R-b R-b
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/6] [soft|hard]float: tests and bug fix for #5203

We had a bug reported that fma fails on some platforms. I can't test the fix but I took the opportunity to extend the TCG test cases to cover a few more of the fma corner cases along with what is hopefully the fix.

It occurred to me that the linux-user tests would be hard to run on windows and also only covered fma() so I added fp-test-hard to do general A/B test comparing softfloat and hardfloat results. Whether this is worth the cost of promoting force_soft_fma to force_soft_float remains to be seen. My initial run with fp-bench shows a drop

Before:

760.21 MFlops

After:

720.04 MFlops

So it might we worth scaling the test back just to fma() and any other places where the compiler/libc can get in the way.

v2
- added tags from pbo
- moved the ref updates to the right commit
- added fp-test-hard

Alex.

Alex Bennée (6):
meson: expose MESON_SOURCE_ROOT to scripts
scripts/tests: add regen-reference.sh
tests/tcg: extend the float_madds test case
fpu/softfloat: gate hardfloat on working fmaf
fpu: promote force_soft_fma to force_soft_float
tests/fp: add fp-test-hard

 meson.build                           |   1 +
 include/fpu/softfloat.h               |   6 +
 fpu/softfloat.c                       |  26 +-
 tests/fp/fp-test-hard.c               | 702 ++++++++++++++++++++++++++
 tests/tcg/multiarch/float_madds.c     |  13 +
 scripts/tests/regen-reference.sh      |  87 ++++
 tests/fp/meson.build                  |  30 +-
 tests/tcg/aarch64/float_madds.ref     |  64 +++
 tests/tcg/alpha/float_madds.ref       |  64 +++
 tests/tcg/arm/float_madds.ref         |  64 +++
 tests/tcg/hexagon/float_madds.ref     |  64 +++
 tests/tcg/hppa/float_madds.ref        |  64 +++
 tests/tcg/i386/float_madds.ref        |  64 +++
 tests/tcg/loongarch64/float_madds.ref |  64 +++
 tests/tcg/m68k/float_madds.ref        |  64 +++
 tests/tcg/mips/float_madds.ref        |  64 +++
 tests/tcg/mips64/float_madds.ref      |  64 +++
 tests/tcg/mips64el/float_madds.ref    |  64 +++
 tests/tcg/mipsel/float_madds.ref      |  64 +++
 tests/tcg/or1k/float_madds.ref        |  16 +
 tests/tcg/ppc64/float_madds.ref       |  64 +++
 tests/tcg/ppc64le/float_madds.ref     |  64 +++
 tests/tcg/riscv64/float_madds.ref     |  64 +++
 tests/tcg/s390x/float_madds.ref       |  64 +++
 tests/tcg/sh4/float_madds.ref         |  32 ++
 tests/tcg/x86_64/float_madds.ref      |  64 +++
 26 files changed, 1979 insertions(+), 22 deletions(-)
 create mode 100644 tests/fp/fp-test-hard.c
 create mode 100755 scripts/tests/regen-reference.sh
Signature · 1 line
2.47.3