Reorg everything using QEMU_GENERIC and multiple inclusion to reduce the amount of code duplication between the formats.
The use of QEMU_GENERIC means that we need to use pointers instead of structures, which means that even the smaller float formats need rearranging. I've carried it through to completion within fpu/, so that we don't have (much) of the legacy code remaining. There is some floatx80 stuff in target/m68k and target/i386 that's still hanging around. r~ Alex Bennée (1): tests/fp: add quad support to the benchmark utility Richard Henderson (71): 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 rount_to_int_and_pack to softfloat-parts.c.inc softfloat: Move rount_to_uint_and_pack to softfloat-parts.c.inc softfloat: Move int_to_float to softfloat-parts.c.inc softfloat: Move uint_to_float to softfloat-parts.c.inc softfloat: Move minmax_flags to softfloat-parts.c.inc softfloat: Move compare_floats to softfloat-parts.c.inc softfloat: Move scalbn_decomposed to softfloat-parts.c.inc softfloat: Move sqrt_float to softfloat-parts.c.inc softfloat: Split out parts_uncanon_normal softfloat: Reduce FloatFmt softfloat: Introduce Floatx80RoundPrec softfloat: Adjust parts_uncanon_normal for floatx80 tests/fp/fp-test: Reverse order of floatx80 precision tests softfloat: Convert floatx80_add/sub to FloatParts softfloat: Convert floatx80_mul to FloatParts softfloat: Convert floatx80_div to FloatParts softfloat: Convert floatx80_sqrt to FloatParts softfloat: Convert floatx80_round to FloatParts softfloat: Convert floatx80_round_to_int to FloatParts softfloat: Convert integer to floatx80 to FloatParts softfloat: Convert floatx80 float conversions to FloatParts softfloat: Convert floatx80 to integer to FloatParts softfloat: Convert floatx80_scalbn to FloatParts softfloat: Convert floatx80 compare to FloatParts softfloat: Convert float32_exp2 to FloatParts softfloat: Move floatN_log2 to softfloat-parts.c.inc softfloat: Convert modrem operations to FloatParts include/fpu/softfloat-helpers.h | 5 +- include/fpu/softfloat-macros.h | 247 +- include/fpu/softfloat-types.h | 10 +- include/fpu/softfloat.h | 11 +- include/qemu/host-utils.h | 291 ++ target/mips/fpu_helper.h | 10 +- accel/tcg/tcg-runtime-gvec.c | 36 +- fpu/softfloat.c | 7760 ++++++++++-------------------- linux-user/arm/nwfpe/fpa11.c | 41 +- target/i386/tcg/fpu_helper.c | 79 +- target/m68k/fpu_helper.c | 50 +- target/m68k/softfloat.c | 90 +- tests/fp/fp-bench.c | 88 +- tests/fp/fp-test-log2.c | 118 + tests/fp/fp-test.c | 11 +- fpu/softfloat-parts-addsub.c.inc | 62 + fpu/softfloat-parts.c.inc | 1480 ++++++ fpu/softfloat-specialize.c.inc | 424 +- tests/fp/wrap.c.inc | 12 + tests/fp/meson.build | 11 + 20 files changed, 4886 insertions(+), 5950 deletions(-) create mode 100644 tests/fp/fp-test-log2.c create mode 100644 fpu/softfloat-parts-addsub.c.inc create mode 100644 fpu/softfloat-parts.c.inc -- 2.25.1