mbox series

[PULL,00/46] softfloat: Convert float128 to FloatParts (part 1)

Message ID 20210516123431.718318-1-richard.henderson@linaro.org
Headers show
Series softfloat: Convert float128 to FloatParts (part 1) | expand

Message

Richard Henderson May 16, 2021, 12:33 p.m. UTC
We have 46 of 72 patches reviewed, and they include ones that
are of express intrest to David, for s390x.  Let's merge these
so that the next patch set is much smaller.


r~


The following changes since commit 6d34aa9969ff85ca6eaeb4dc1988a4d4e13e7d79:

  Merge remote-tracking branch 'remotes/marcandre/tags/rtd-pull-request' into staging (2021-05-14 17:20:08 +0100)

are available in the Git repository at:

  https://gitlab.com/rth7680/qemu.git tags/pull-fp-20210516

for you to fetch changes up to 463b3f0d7fa11054daeb5ca22346f77d566795bf:

  softfloat: Move round_to_int_and_pack to softfloat-parts.c.inc (2021-05-16 07:13:51 -0500)

----------------------------------------------------------------
Reorg FloatParts to use QEMU_GENERIC.
Begin replacing the Berkeley float128 routines with FloatParts128.
  - includes a new implementation of float128_muladd
  - includes the snan silencing that was missing from
    float{32,64}_to_float128 and float128_to_float{32,64}.
  - does not include float128_min/max* (written but not yet reviewed).

----------------------------------------------------------------
Alex Bennée (1):
      tests/fp: add quad support to the benchmark utility

Richard Henderson (45):
      qemu/host-utils: Use __builtin_bitreverseN
      qemu/host-utils: Add wrappers for overflow builtins
      qemu/host-utils: Add wrappers for carry builtins
      accel/tcg: Use add/sub overflow routines in tcg-runtime-gvec.c
      softfloat: Move the binary point to the msb
      softfloat: Inline float_raise
      softfloat: Use float_raise in more places
      softfloat: Tidy a * b + inf return
      softfloat: Add float_cmask and constants
      softfloat: Use return_nan in float_to_float
      softfloat: fix return_nan vs default_nan_mode
      target/mips: Set set_default_nan_mode with set_snan_bit_is_one
      softfloat: Do not produce a default_nan from parts_silence_nan
      softfloat: Rename FloatParts to FloatParts64
      softfloat: Move type-specific pack/unpack routines
      softfloat: Use pointers with parts_default_nan
      softfloat: Use pointers with unpack_raw
      softfloat: Use pointers with ftype_unpack_raw
      softfloat: Use pointers with pack_raw
      softfloat: Use pointers with ftype_pack_raw
      softfloat: Use pointers with ftype_unpack_canonical
      softfloat: Use pointers with ftype_round_pack_canonical
      softfloat: Use pointers with parts_silence_nan
      softfloat: Rearrange FloatParts64
      softfloat: Convert float128_silence_nan to parts
      softfloat: Convert float128_default_nan to parts
      softfloat: Move return_nan to softfloat-parts.c.inc
      softfloat: Move pick_nan to softfloat-parts.c.inc
      softfloat: Move pick_nan_muladd to softfloat-parts.c.inc
      softfloat: Move sf_canonicalize to softfloat-parts.c.inc
      softfloat: Move round_canonical to softfloat-parts.c.inc
      softfloat: Use uadd64_carry, usub64_borrow in softfloat-macros.h
      softfloat: Move addsub_floats to softfloat-parts.c.inc
      softfloat: Implement float128_add/sub via parts
      softfloat: Move mul_floats to softfloat-parts.c.inc
      softfloat: Move muladd_floats to softfloat-parts.c.inc
      softfloat: Use mulu64 for mul64To128
      softfloat: Use add192 in mul128To256
      softfloat: Tidy mul128By64To192
      softfloat: Introduce sh[lr]_double primitives
      softfloat: Move div_floats to softfloat-parts.c.inc
      softfloat: Split float_to_float
      softfloat: Convert float-to-float conversions with float128
      softfloat: Move round_to_int to softfloat-parts.c.inc
      softfloat: Move round_to_int_and_pack to softfloat-parts.c.inc

 include/fpu/softfloat-macros.h   |  213 +--
 include/fpu/softfloat.h          |    7 +-
 include/qemu/host-utils.h        |  291 +++
 target/mips/fpu_helper.h         |   10 +-
 accel/tcg/tcg-runtime-gvec.c     |   36 +-
 fpu/softfloat.c                  | 3701 ++++++++++++++++----------------------
 tests/fp/fp-bench.c              |   88 +-
 tests/fp/fp-test.c               |    2 +-
 fpu/softfloat-parts-addsub.c.inc |   62 +
 fpu/softfloat-parts.c.inc        |  817 +++++++++
 fpu/softfloat-specialize.c.inc   |   84 +-
 tests/fp/wrap.c.inc              |   12 +
 12 files changed, 2974 insertions(+), 2349 deletions(-)
 create mode 100644 fpu/softfloat-parts-addsub.c.inc
 create mode 100644 fpu/softfloat-parts.c.inc

Comments

no-reply@patchew.org May 16, 2021, 1:19 p.m. UTC | #1
Patchew URL: https://patchew.org/QEMU/20210516123431.718318-1-richard.henderson@linaro.org/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20210516123431.718318-1-richard.henderson@linaro.org
Subject: [PULL 00/46] softfloat: Convert float128 to FloatParts (part 1)

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/20210516123431.718318-1-richard.henderson@linaro.org -> patchew/20210516123431.718318-1-richard.henderson@linaro.org
Switched to a new branch 'test'
79b3657 softfloat: Move round_to_int_and_pack to softfloat-parts.c.inc
18be64c softfloat: Move round_to_int to softfloat-parts.c.inc
d819a18 softfloat: Convert float-to-float conversions with float128
6af91f7 softfloat: Split float_to_float
1f5260c softfloat: Move div_floats to softfloat-parts.c.inc
f4eca57 softfloat: Introduce sh[lr]_double primitives
4d88a4d softfloat: Tidy mul128By64To192
885f3ae softfloat: Use add192 in mul128To256
5d10ba5 softfloat: Use mulu64 for mul64To128
cdddd66 softfloat: Move muladd_floats to softfloat-parts.c.inc
13c5b80 softfloat: Move mul_floats to softfloat-parts.c.inc
5bc8e89 softfloat: Implement float128_add/sub via parts
5ab3959 softfloat: Move addsub_floats to softfloat-parts.c.inc
460d30c softfloat: Use uadd64_carry, usub64_borrow in softfloat-macros.h
99f3265 softfloat: Move round_canonical to softfloat-parts.c.inc
c0d23dc softfloat: Move sf_canonicalize to softfloat-parts.c.inc
21a70b0 softfloat: Move pick_nan_muladd to softfloat-parts.c.inc
2f42141 softfloat: Move pick_nan to softfloat-parts.c.inc
fc6b980 softfloat: Move return_nan to softfloat-parts.c.inc
7ae2da4 softfloat: Convert float128_default_nan to parts
930550f softfloat: Convert float128_silence_nan to parts
d5c84b6 softfloat: Rearrange FloatParts64
166bea0 softfloat: Use pointers with parts_silence_nan
70472ce softfloat: Use pointers with ftype_round_pack_canonical
fa88f30 softfloat: Use pointers with ftype_unpack_canonical
b3f4218 softfloat: Use pointers with ftype_pack_raw
6efd675 softfloat: Use pointers with pack_raw
f550064 softfloat: Use pointers with ftype_unpack_raw
c91d07c softfloat: Use pointers with unpack_raw
abeae2e softfloat: Use pointers with parts_default_nan
1ebb32c softfloat: Move type-specific pack/unpack routines
5988d22 softfloat: Rename FloatParts to FloatParts64
4929b37 softfloat: Do not produce a default_nan from parts_silence_nan
1cc195f target/mips: Set set_default_nan_mode with set_snan_bit_is_one
5c7f249 softfloat: fix return_nan vs default_nan_mode
ecf52bd softfloat: Use return_nan in float_to_float
db50e0a softfloat: Add float_cmask and constants
c8a1ed9 softfloat: Tidy a * b + inf return
4e15ceb softfloat: Use float_raise in more places
4c3af8c softfloat: Inline float_raise
0c1fefd softfloat: Move the binary point to the msb
b48d53f tests/fp: add quad support to the benchmark utility
6dcc2d6 accel/tcg: Use add/sub overflow routines in tcg-runtime-gvec.c
e22fa0d qemu/host-utils: Add wrappers for carry builtins
f7e908a qemu/host-utils: Add wrappers for overflow builtins
e2a38a2 qemu/host-utils: Use __builtin_bitreverseN

=== OUTPUT BEGIN ===
1/46 Checking commit e2a38a2b2f12 (qemu/host-utils: Use __builtin_bitreverseN)
WARNING: architecture specific defines should be avoided
#26: FILE: include/qemu/host-utils.h:275:
+#if __has_builtin(__builtin_bitreverse8)

WARNING: architecture specific defines should be avoided
#44: FILE: include/qemu/host-utils.h:296:
+#if __has_builtin(__builtin_bitreverse16)

WARNING: architecture specific defines should be avoided
#62: FILE: include/qemu/host-utils.h:319:
+#if __has_builtin(__builtin_bitreverse32)

WARNING: architecture specific defines should be avoided
#80: FILE: include/qemu/host-utils.h:342:
+#if __has_builtin(__builtin_bitreverse64)

total: 0 errors, 4 warnings, 64 lines checked

Patch 1/46 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/46 Checking commit f7e908a5a70f (qemu/host-utils: Add wrappers for overflow builtins)
WARNING: architecture specific defines should be avoided
#35: FILE: include/qemu/host-utils.h:369:
+#if __has_builtin(__builtin_add_overflow) || __GNUC__ >= 5

WARNING: architecture specific defines should be avoided
#53: FILE: include/qemu/host-utils.h:387:
+#if __has_builtin(__builtin_add_overflow) || __GNUC__ >= 5

WARNING: architecture specific defines should be avoided
#71: FILE: include/qemu/host-utils.h:405:
+#if __has_builtin(__builtin_add_overflow) || __GNUC__ >= 5

WARNING: architecture specific defines should be avoided
#89: FILE: include/qemu/host-utils.h:423:
+#if __has_builtin(__builtin_add_overflow) || __GNUC__ >= 5

WARNING: architecture specific defines should be avoided
#108: FILE: include/qemu/host-utils.h:442:
+#if __has_builtin(__builtin_sub_overflow) || __GNUC__ >= 5

WARNING: architecture specific defines should be avoided
#127: FILE: include/qemu/host-utils.h:461:
+#if __has_builtin(__builtin_sub_overflow) || __GNUC__ >= 5

WARNING: architecture specific defines should be avoided
#146: FILE: include/qemu/host-utils.h:480:
+#if __has_builtin(__builtin_sub_overflow) || __GNUC__ >= 5

WARNING: architecture specific defines should be avoided
#165: FILE: include/qemu/host-utils.h:499:
+#if __has_builtin(__builtin_sub_overflow) || __GNUC__ >= 5

WARNING: architecture specific defines should be avoided
#183: FILE: include/qemu/host-utils.h:517:
+#if __has_builtin(__builtin_mul_overflow) || __GNUC__ >= 5

WARNING: architecture specific defines should be avoided
#202: FILE: include/qemu/host-utils.h:536:
+#if __has_builtin(__builtin_mul_overflow) || __GNUC__ >= 5

WARNING: architecture specific defines should be avoided
#222: FILE: include/qemu/host-utils.h:556:
+#if __has_builtin(__builtin_mul_overflow) || __GNUC__ >= 5

WARNING: architecture specific defines should be avoided
#241: FILE: include/qemu/host-utils.h:575:
+#if __has_builtin(__builtin_mul_overflow) || __GNUC__ >= 5

total: 0 errors, 12 warnings, 231 lines checked

Patch 2/46 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/46 Checking commit e22fa0d5b6fa (qemu/host-utils: Add wrappers for carry builtins)
WARNING: architecture specific defines should be avoided
#44: FILE: include/qemu/host-utils.h:595:
+#if __has_builtin(__builtin_addcll)

WARNING: architecture specific defines should be avoided
#69: FILE: include/qemu/host-utils.h:620:
+#if __has_builtin(__builtin_subcll)

total: 0 errors, 2 warnings, 62 lines checked

Patch 3/46 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
4/46 Checking commit 6dcc2d65e93d (accel/tcg: Use add/sub overflow routines in tcg-runtime-gvec.c)
5/46 Checking commit b48d53fa620f (tests/fp: add quad support to the benchmark utility)
WARNING: line over 80 characters
#183: FILE: tests/fp/fp-bench.c:458:
+    GEN_BENCH_NO_NEG(bench_ ## name ## _float128, float128, PREC_FLOAT128, op, n)

WARNING: line over 80 characters
#200: FILE: tests/fp/fp-bench.c:521:
+    fprintf(stderr, " -p = floating point precision (single, double, quad[soft only]). "

total: 0 errors, 2 warnings, 185 lines checked

Patch 5/46 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
6/46 Checking commit 0c1fefd5c3f0 (softfloat: Move the binary point to the msb)
7/46 Checking commit 4c3af8cc9fe3 (softfloat: Inline float_raise)
8/46 Checking commit 4e15cebadbae (softfloat: Use float_raise in more places)
9/46 Checking commit c8a1ed948f41 (softfloat: Tidy a * b + inf return)
10/46 Checking commit db50e0afca55 (softfloat: Add float_cmask and constants)
11/46 Checking commit ecf52bd4406e (softfloat: Use return_nan in float_to_float)
12/46 Checking commit 5c7f249cdc9d (softfloat: fix return_nan vs default_nan_mode)
13/46 Checking commit 1cc195fa4cd7 (target/mips: Set set_default_nan_mode with set_snan_bit_is_one)
14/46 Checking commit 4929b3715c49 (softfloat: Do not produce a default_nan from parts_silence_nan)
15/46 Checking commit 5988d229db64 (softfloat: Rename FloatParts to FloatParts64)
WARNING: line over 80 characters
#237: FILE: fpu/softfloat.c:928:
+static FloatParts64 pick_nan_muladd(FloatParts64 a, FloatParts64 b, FloatParts64 c,

WARNING: line over 80 characters
#392: FILE: fpu/softfloat.c:1347:
+static FloatParts64 muladd_floats(FloatParts64 a, FloatParts64 b, FloatParts64 c,

WARNING: line over 80 characters
#839: FILE: fpu/softfloat.c:3189:
+static FloatRelation compare_floats(FloatParts64 a, FloatParts64 b, bool is_quiet,

WARNING: Block comments use a leading /* on a separate line
#877: FILE: fpu/softfloat.c:3374:
+        /* The largest float type (even though not supported by FloatParts64)

WARNING: line over 80 characters
#928: FILE: fpu/softfloat.c:3425:
+static FloatParts64 sqrt_float(FloatParts64 a, float_status *s, const FloatFmt *p)

total: 0 errors, 5 warnings, 1002 lines checked

Patch 15/46 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
16/46 Checking commit 1ebb32c57926 (softfloat: Move type-specific pack/unpack routines)
17/46 Checking commit abeae2e27921 (softfloat: Use pointers with parts_default_nan)
18/46 Checking commit c91d07c41cae (softfloat: Use pointers with unpack_raw)
19/46 Checking commit f550064760e5 (softfloat: Use pointers with ftype_unpack_raw)
20/46 Checking commit 6efd67588db3 (softfloat: Use pointers with pack_raw)
21/46 Checking commit b3f421862b00 (softfloat: Use pointers with ftype_pack_raw)
22/46 Checking commit fa88f30a7b7e (softfloat: Use pointers with ftype_unpack_canonical)
23/46 Checking commit 70472cef4a39 (softfloat: Use pointers with ftype_round_pack_canonical)
24/46 Checking commit 166bea0928a4 (softfloat: Use pointers with parts_silence_nan)
25/46 Checking commit d5c84b6677af (softfloat: Rearrange FloatParts64)
26/46 Checking commit 930550f4640a (softfloat: Convert float128_silence_nan to parts)
27/46 Checking commit 7ae2da49e108 (softfloat: Convert float128_default_nan to parts)
28/46 Checking commit fc6b980782ca (softfloat: Move return_nan to softfloat-parts.c.inc)
Use of uninitialized value $acpi_testexpected in string eq at ./scripts/checkpatch.pl line 1529.
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#19: 
new file mode 100644

total: 0 errors, 1 warnings, 124 lines checked

Patch 28/46 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
29/46 Checking commit 2f421417242d (softfloat: Move pick_nan to softfloat-parts.c.inc)
30/46 Checking commit 21a70b06443a (softfloat: Move pick_nan_muladd to softfloat-parts.c.inc)
31/46 Checking commit c0d23dc89648 (softfloat: Move sf_canonicalize to softfloat-parts.c.inc)
32/46 Checking commit 99f3265020ae (softfloat: Move round_canonical to softfloat-parts.c.inc)
33/46 Checking commit 460d30c52eef (softfloat: Use uadd64_carry, usub64_borrow in softfloat-macros.h)
34/46 Checking commit 5ab3959d792b (softfloat: Move addsub_floats to softfloat-parts.c.inc)
Use of uninitialized value $acpi_testexpected in string eq at ./scripts/checkpatch.pl line 1529.
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#20: 
new file mode 100644

ERROR: space required after that ',' (ctx:VxV)
#271: FILE: fpu/softfloat.c:958:
+#define partsN(NAME)   glue(glue(glue(parts,N),_),NAME)
                                            ^

ERROR: space required after that ',' (ctx:VxV)
#271: FILE: fpu/softfloat.c:958:
+#define partsN(NAME)   glue(glue(glue(parts,N),_),NAME)
                                               ^

ERROR: space required after that ',' (ctx:VxV)
#271: FILE: fpu/softfloat.c:958:
+#define partsN(NAME)   glue(glue(glue(parts,N),_),NAME)
                                                  ^

ERROR: space required after that ',' (ctx:VxV)
#272: FILE: fpu/softfloat.c:959:
+#define FloatPartsN    glue(FloatParts,N)
                                       ^

total: 4 errors, 1 warnings, 489 lines checked

Patch 34/46 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

35/46 Checking commit 5bc8e893b82c (softfloat: Implement float128_add/sub via parts)
36/46 Checking commit 13c5b809ad52 (softfloat: Move mul_floats to softfloat-parts.c.inc)
ERROR: space required after that ',' (ctx:VxV)
#152: FILE: fpu/softfloat.c:1004:
+#define FloatPartsW    glue(FloatParts,W)
                                       ^

total: 1 errors, 0 warnings, 350 lines checked

Patch 36/46 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

37/46 Checking commit cdddd6645bf8 (softfloat: Move muladd_floats to softfloat-parts.c.inc)
38/46 Checking commit 5d10ba5c97c7 (softfloat: Use mulu64 for mul64To128)
39/46 Checking commit 885f3aee0766 (softfloat: Use add192 in mul128To256)
ERROR: space prohibited after that open parenthesis '('
#63: FILE: include/fpu/softfloat-macros.h:527:
+    add192( 0, m1, m2,  0, n1, n2, &m0, &m1, &m2);

total: 1 errors, 0 warnings, 46 lines checked

Patch 39/46 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

40/46 Checking commit 4d88a4d4f75f (softfloat: Tidy mul128By64To192)
41/46 Checking commit f4eca575050b (softfloat: Introduce sh[lr]_double primitives)
WARNING: architecture specific defines should be avoided
#204: FILE: include/fpu/softfloat-macros.h:98:
+#if defined(__x86_64__)

WARNING: architecture specific defines should be avoided
#222: FILE: include/fpu/softfloat-macros.h:116:
+#if defined(__x86_64__)

total: 0 errors, 2 warnings, 199 lines checked

Patch 41/46 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
42/46 Checking commit 1f5260ca2a6d (softfloat: Move div_floats to softfloat-parts.c.inc)
43/46 Checking commit 6af91f773b19 (softfloat: Split float_to_float)
44/46 Checking commit d819a1897339 (softfloat: Convert float-to-float conversions with float128)
45/46 Checking commit 18be64c3bced (softfloat: Move round_to_int to softfloat-parts.c.inc)
46/46 Checking commit 79b3657a3f44 (softfloat: Move round_to_int_and_pack to softfloat-parts.c.inc)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20210516123431.718318-1-richard.henderson@linaro.org/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Peter Maydell May 18, 2021, 10:11 a.m. UTC | #2
On Sun, 16 May 2021 at 13:34, Richard Henderson
<richard.henderson@linaro.org> wrote:
>

> We have 46 of 72 patches reviewed, and they include ones that

> are of express intrest to David, for s390x.  Let's merge these

> so that the next patch set is much smaller.

>

>

> r~

>

>

> The following changes since commit 6d34aa9969ff85ca6eaeb4dc1988a4d4e13e7d79:

>

>   Merge remote-tracking branch 'remotes/marcandre/tags/rtd-pull-request' into staging (2021-05-14 17:20:08 +0100)

>

> are available in the Git repository at:

>

>   https://gitlab.com/rth7680/qemu.git tags/pull-fp-20210516

>

> for you to fetch changes up to 463b3f0d7fa11054daeb5ca22346f77d566795bf:

>

>   softfloat: Move round_to_int_and_pack to softfloat-parts.c.inc (2021-05-16 07:13:51 -0500)

>

> ----------------------------------------------------------------

> Reorg FloatParts to use QEMU_GENERIC.

> Begin replacing the Berkeley float128 routines with FloatParts128.

>   - includes a new implementation of float128_muladd

>   - includes the snan silencing that was missing from

>     float{32,64}_to_float128 and float128_to_float{32,64}.

>   - does not include float128_min/max* (written but not yet reviewed).



Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/6.1
for any user-visible changes.

-- PMM