mbox series

[v2,00/12] fpu: Remove remaining target ifdefs and build only once

Message ID 20250224111524.1101196-1-peter.maydell@linaro.org
Headers show
Series fpu: Remove remaining target ifdefs and build only once | expand

Message

Peter Maydell Feb. 24, 2025, 11:15 a.m. UTC
This is version 2 of the series that removes all the target
ifdefs from fpu/ and switches it to being built only once
rather than once per target. The ifdefs are all either
(1) floatx80 behaviours or (2) simple optimizations to take
a decision at compiletime which we already have the mechanism
to do at runtime.

Tested with 'make check-tcg' and 'make check-functional'; the
series is supposed to not have any behaviour changes.

Changes v1->v2:
 * Split the old patches 4 and 5 so each has a patch which
   only adds the float_status argument to floatx80_is_infinity()
   or floatx80_invalid_encoding(), followed by a smaller patch
   which makes the real behaviour change
 * Updated the comments in the m68k_denormal patch as per
   review discussion

Since the old patches 4 and 5 were both reviewed in their unsplit
form and I have confirmed that the splitting didn't accidentally
produce any change in the code, I have retained both RTH's
and Philippe's reviewed-by tags on all the post-split patches.

So I think we can consider this series as fully reviewed.
Does anybody have any preference for which tree it goes in by?
I can probably throw it in to target-arm.next if nobody has
a better suggestion.

thanks
-- PMM

Peter Maydell (12):
  fpu: Make targets specify floatx80 default Inf at runtime
  target/m68k: Avoid using floatx80_infinity global const
  target/i386: Avoid using floatx80_infinity global const
  fpu: Pass float_status to floatx80_is_infinity()
  fpu: Make targets specify whether floatx80 Inf can have Int bit clear
  fpu: Pass float_status to floatx80_invalid_encoding()
  fpu: Make floatx80 invalid encoding settable at runtime
  fpu: Move m68k_denormal fmt flag into floatx80_behaviour
  fpu: Always decide no_signaling_nans() at runtime
  fpu: Always decide snan_bit_is_one() at runtime
  fpu: Don't compile-time disable hardfloat for PPC targets
  fpu: Build only once

 include/fpu/softfloat-helpers.h | 12 +++++
 include/fpu/softfloat-types.h   | 51 ++++++++++++++++++
 include/fpu/softfloat.h         | 91 ++++++++++++++++++---------------
 fpu/softfloat.c                 | 23 +++------
 target/hppa/fpu_helper.c        |  1 +
 target/i386/tcg/fpu_helper.c    | 51 +++++++++---------
 target/m68k/cpu.c               | 35 +++++++++++++
 target/m68k/fpu_helper.c        |  2 +-
 target/m68k/softfloat.c         | 47 ++++++-----------
 target/sh4/cpu.c                |  1 +
 fpu/softfloat-parts.c.inc       | 27 ++++++++--
 fpu/softfloat-specialize.c.inc  | 29 ++++-------
 fpu/meson.build                 |  2 +-
 13 files changed, 236 insertions(+), 136 deletions(-)

Comments

Richard Henderson Feb. 24, 2025, 3:18 p.m. UTC | #1
On 2/24/25 03:15, Peter Maydell wrote:
> So I think we can consider this series as fully reviewed.
> Does anybody have any preference for which tree it goes in by?
> I can probably throw it in to target-arm.next if nobody has
> a better suggestion.

That seems reasonable.

r~