Skip to content

hardfloat

Emilio G. Cota qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest13 patches 21 repliesIn review
  2. v513 patches 0 repliesSuperseded

Changes in v6 from the cover letter

- Rebase on rth/tcg-next-for-4.0

- Use QEMU_FLATTEN instead of __attribute__((flatten))

- Merge rth's cleanups (thanks!). With this, we now use a union to hold {float|float32} or {double|float64} types, which gets rid of most macros. I added a few optimizations (i.e. likely hints in some branches, and not using temp variables to hold the result of fpclassify) to roughly match (and sometimes surpass) v5's performance.

- float64_sqrt: use fpclassify, which gives a 1.5x speedup.

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13fp-test: pick TARGET_ARM to get its specializationtests/fp/Makefile+3 -01 reply
2/13softfloat: add float{32, 64}_is_{de, }normalinclude/fpu/softfloat.h+20 -00 replies
3/13target/tricore: use float32_is_denormaltarget/tricore/fpu_helper.c+2 -70 replies
4/13softfloat: rename canonicalize to sf_canonicalizefpu/softfloat.c+5 -51 reply
5/13softfloat: add float{32, 64}_is_zero_or_normalinclude/fpu/softfloat.h+10 -01 reply
6/13tests/fp: add fp-benchtests/fp/.gitignore tests/fp/Makefile tests/fp/fp-bench.c+635 -11 reply
7/13fpu: introduce hardfloatfpu/softfloat.c+315 -07 replies
8/13hardfloat: implement float32/64 addition and subtractionfpu/softfloat.c+98 -192 replies
9/13hardfloat: implement float32/64 multiplicationfpu/softfloat.c+52 -21 reply
10/13hardfloat: implement float32/64 divisionfpu/softfloat.c+62 -21 reply
11/13hardfloat: implement float32/64 fused multiply-addfpu/softfloat.c+128 -41 reply
12/13hardfloat: implement float32/64 square rootfpu/softfloat.c+58 -21 reply
13/13hardfloat: implement float32/64 comparisonfpu/softfloat.c+95 -141 reply

Reviews trailers per patch

All 13 patches have a Reviewed-by or Acked-by.

PatchBastian KoppelmannAlex Bennée
1/13R-b T-b
2/13R-b R-b
3/13R-b
4/13T-b R-b
5/13R-b
6/13R-b
7/13R-b
8/13R-b
9/13R-b
10/13R-b
11/13R-b
12/13R-b
13/13R-b

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

Read the v6 thread

Cover letter [Qemu-devel] [PATCH v6 00/13] hardfloat

v5: https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02793.html

Changes since v5:

- Rebase on rth/tcg-next-for-4.0

- Use QEMU_FLATTEN instead of __attribute__((flatten))

- Merge rth's cleanups (thanks!). With this, we now use a union to hold {float|float32} or {double|float64} types, which gets rid of most macros. I added a few optimizations (i.e. likely hints in some branches, and not using temp variables to hold the result of fpclassify) to roughly match (and sometimes surpass) v5's performance.

- float64_sqrt: use fpclassify, which gives a 1.5x speedup.

This series introduces no regressions to fp-test. You can test hardfloat by passing "-f x" to fp-test (so that the inexact flag is set before each operation) and using even rounding (fp-test's default). Note that hardfloat does not affect operations with other rounding modes.

Perf numbers for fp-bench running on several host machines are in each commit log; numbers for several benchmarks (NBench, SPEC06fp) are in the last patch's commit log. These numbers are a bit outdated (they're from v2 or so), but I've decided to keep them because they give a good idea of the speedups to expect, and I don't have time to re-run them =)

I did re-run the numbers for sqrt and cmp, though, since the implementation has changed quite a bit since v5. I didn't re-run these on Aarch64 and PPC hosts due to lack of time, but I doubt they'd change significantly.

You can fetch this series from:
https://github.com/cota/qemu/tree/hardfloat-v6

Thanks,

Emilio