All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/19] softfloat: Clean up NaN handling
@ 2018-05-11  0:43 Richard Henderson
  2018-05-11  0:43 ` [Qemu-devel] [PATCH 01/19] fpu/softfloat: Merge NO_SIGNALING_NANS definitions Richard Henderson
                   ` (18 more replies)
  0 siblings, 19 replies; 29+ messages in thread
From: Richard Henderson @ 2018-05-11  0:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, alex.bennee

This is intended to address Peter's comments wrt Alex's float-to-float
conversion patches.  In particular, the handling of NaNs therein, where
some SNaN get converted to Inf instead of the appropriate QNaN.

I canonicalize NaNs within FloatParts much like we do with the original
softfpu commonNaNT.  With this, a couple of new specialize functions
allows me to remove the float_class_dnan/float_class_msnan placeholders.

This is based on some of Alex's work, which includes both the check-tcg
and the float-to-float patches.  My guess is that in the end we should
order this first.  But writing it this way was easier, for testing.

The full tree is

  git://github.com/rth7680/qemu.git fpu-snan

with these patches beginning at the merge at 537ab46101f5.


r~


Richard Henderson (19):
  fpu/softfloat: Merge NO_SIGNALING_NANS definitions
  fpu/softfloat: Split floatXX_silence_nan from floatXX_maybe_silence_nan
  fpu/softfloat: Move softfloat-specialize.h below FloatParts definition
  fpu/softfloat: Canonicalize NaN fraction
  fpu/softfloat: Introduce parts_is_snan_frac
  fpu/softfloat: Replace float_class_dnan with parts_default_nan
  fpu/softfloat: Replace float_class_msnan with parts_silence_nan
  target/arm: Use floatX_silence_nan when we have already checked for SNaN
  target/arm: Remove floatX_maybe_silence_nan from conversions
  target/hppa: Remove floatX_maybe_silence_nan from conversions
  target/m68k: Use floatX_silence_nan when we have already checked for SNaN
  target/mips: Remove floatX_maybe_silence_nan from conversions
  target/riscv: Remove floatX_maybe_silence_nan from conversions
  target/s390x: Remove floatX_maybe_silence_nan from conversions
  fpu/softfloat: Use float*_silence_nan in propagateFloat*NaN
  fpu/softfloat: Remove floatX_maybe_silence_nan
  fpu/softfloat: Introduce SNAN_BIT_IS_ONE
  fpu/softfloat: Pass FloatClass to pickNaN
  fpu/softfloat: Pass FloatClass to pickNaNMulAdd

 fpu/softfloat-specialize.h    | 621 +++++++++++++++++++---------------
 include/fpu/softfloat-types.h |   1 +
 include/fpu/softfloat.h       |  14 +-
 target/mips/cpu.h             |   4 +-
 fpu/softfloat.c               | 162 ++++-----
 target/arm/helper-a64.c       |   7 +-
 target/arm/helper.c           |  24 +-
 target/hppa/cpu.c             |   1 -
 target/hppa/op_helper.c       |   2 -
 target/m68k/softfloat.c       |   3 +-
 target/mips/msa_helper.c      |   4 -
 target/mips/op_helper.c       |   2 -
 target/mips/translate_init.c  |   4 +-
 target/ppc/fpu_helper.c       |   1 -
 target/riscv/fpu_helper.c     |   6 +-
 target/s390x/fpu_helper.c     |  12 +-
 target/sh4/cpu.c              |   1 -
 target/unicore32/cpu.c        |   2 -
 18 files changed, 430 insertions(+), 441 deletions(-)

-- 
2.17.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2018-05-11 16:47 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-11  0:43 [Qemu-devel] [PATCH 00/19] softfloat: Clean up NaN handling Richard Henderson
2018-05-11  0:43 ` [Qemu-devel] [PATCH 01/19] fpu/softfloat: Merge NO_SIGNALING_NANS definitions Richard Henderson
2018-05-11  6:44   ` Alex Bennée
2018-05-11  0:43 ` [Qemu-devel] [PATCH 02/19] fpu/softfloat: Split floatXX_silence_nan from floatXX_maybe_silence_nan Richard Henderson
2018-05-11  7:47   ` Alex Bennée
2018-05-11 15:06     ` Alex Bennée
2018-05-11 15:16       ` Richard Henderson
2018-05-11  0:43 ` [Qemu-devel] [PATCH 03/19] fpu/softfloat: Move softfloat-specialize.h below FloatParts definition Richard Henderson
2018-05-11  7:48   ` Alex Bennée
2018-05-11  0:43 ` [Qemu-devel] [PATCH 04/19] fpu/softfloat: Canonicalize NaN fraction Richard Henderson
2018-05-11 16:26   ` Alex Bennée
2018-05-11 16:46     ` Richard Henderson
2018-05-11  0:43 ` [Qemu-devel] [PATCH 05/19] fpu/softfloat: Introduce parts_is_snan_frac Richard Henderson
2018-05-11  0:43 ` [Qemu-devel] [PATCH 06/19] fpu/softfloat: Replace float_class_dnan with parts_default_nan Richard Henderson
2018-05-11  0:43 ` [Qemu-devel] [PATCH 07/19] fpu/softfloat: Replace float_class_msnan with parts_silence_nan Richard Henderson
2018-05-11  0:43 ` [Qemu-devel] [PATCH 08/19] target/arm: Use floatX_silence_nan when we have already checked for SNaN Richard Henderson
2018-05-11  0:43 ` [Qemu-devel] [PATCH 09/19] target/arm: Remove floatX_maybe_silence_nan from conversions Richard Henderson
2018-05-11  0:43 ` [Qemu-devel] [PATCH 10/19] target/hppa: " Richard Henderson
2018-05-11  0:43 ` [Qemu-devel] [PATCH 11/19] target/m68k: Use floatX_silence_nan when we have already checked for SNaN Richard Henderson
2018-05-11 10:11   ` Laurent Vivier
2018-05-11  0:43 ` [Qemu-devel] [PATCH 12/19] target/mips: Remove floatX_maybe_silence_nan from conversions Richard Henderson
2018-05-11  0:43 ` [Qemu-devel] [PATCH 13/19] target/riscv: " Richard Henderson
2018-05-11  0:43 ` [Qemu-devel] [PATCH 14/19] target/s390x: " Richard Henderson
2018-05-11  6:47   ` David Hildenbrand
2018-05-11  0:43 ` [Qemu-devel] [PATCH 15/19] fpu/softfloat: Use float*_silence_nan in propagateFloat*NaN Richard Henderson
2018-05-11  0:43 ` [Qemu-devel] [PATCH 16/19] fpu/softfloat: Remove floatX_maybe_silence_nan Richard Henderson
2018-05-11  0:43 ` [Qemu-devel] [PATCH 17/19] fpu/softfloat: Introduce SNAN_BIT_IS_ONE Richard Henderson
2018-05-11  0:43 ` [Qemu-devel] [PATCH 18/19] fpu/softfloat: Pass FloatClass to pickNaN Richard Henderson
2018-05-11  0:43 ` [Qemu-devel] [PATCH 19/19] fpu/softfloat: Pass FloatClass to pickNaNMulAdd Richard Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.