qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-3.1 0/7] target/ppc fp cleanups
@ 2018-07-03 15:17 Richard Henderson
  2018-07-03 15:17 ` [Qemu-devel] [PATCH 1/7] target/ppc: Enable fp exceptions for user-only Richard Henderson
                   ` (8 more replies)
  0 siblings, 9 replies; 23+ messages in thread
From: Richard Henderson @ 2018-07-03 15:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: programmingkidx, david, qemu-ppc

Beginning with John Arbuckle's fdiv test case, clean up some
of the fp helpers.  As with fdiv, fre and fresqrt are missing
divide-by-zero exceptions.

I've also noticed that load/store were using arithmetic conversions
to/from float32.  These should be using the non-arithmetic algorithms
listed in the manual.

Aside from cleaning up all of the rest of the helpers, I believe that
the implementation of the single-precision operations are incorrect.
They are currently implemented with the double-precision operation
followed by a round-to-single.  This causes incorrect results via
double rounding.  I believe better results could be had by using
these non-arithmetic converters to produce float32 operands, use the
proper float32 softfloat operations, and then convert back.

Anyway, all of this has been broken long enough that it'll need to
wait til next devel cycle before anything further gets done.


r~


Richard Henderson (7):
  target/ppc: Enable fp exceptions for user-only
  target/ppc: Honor fpscr_ze semantics and tidy fdiv
  target/ppc: Tidy helper_fmul
  target/ppc: Tidy helper_fadd, helper_fsub
  target/ppc: Tidy helper_fsqrt
  target/ppc: Honor fpscr_ze semantics and tidy fre, fresqrt
  target/ppc: Use non-arithmetic conversions for fp load/store

 target/ppc/helper.h                |  14 +-
 target/ppc/fpu_helper.c            | 294 +++++++++++++++++------------
 target/ppc/translate/fp-impl.inc.c |  26 +--
 target/ppc/translate_init.inc.c    |   2 +
 4 files changed, 189 insertions(+), 147 deletions(-)

-- 
2.17.1

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

end of thread, other threads:[~2018-08-06  1:33 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-03 15:17 [Qemu-devel] [PATCH for-3.1 0/7] target/ppc fp cleanups Richard Henderson
2018-07-03 15:17 ` [Qemu-devel] [PATCH 1/7] target/ppc: Enable fp exceptions for user-only Richard Henderson
2018-07-03 15:17 ` [Qemu-devel] [PATCH 2/7] target/ppc: Honor fpscr_ze semantics and tidy fdiv Richard Henderson
2018-07-03 15:17 ` [Qemu-devel] [PATCH 3/7] target/ppc: Tidy helper_fmul Richard Henderson
2018-07-03 15:17 ` [Qemu-devel] [PATCH 4/7] target/ppc: Tidy helper_fadd, helper_fsub Richard Henderson
2018-07-03 15:17 ` [Qemu-devel] [PATCH 5/7] target/ppc: Tidy helper_fsqrt Richard Henderson
2018-07-03 15:17 ` [Qemu-devel] [PATCH 6/7] target/ppc: Honor fpscr_ze semantics and tidy fre, fresqrt Richard Henderson
2018-07-03 15:17 ` [Qemu-devel] [PATCH 7/7] target/ppc: Use non-arithmetic conversions for fp load/store Richard Henderson
2018-07-05 16:31   ` Programmingkid
2018-07-05 16:48     ` Richard Henderson
2018-07-05 16:51       ` Programmingkid
2018-07-06  1:03         ` David Gibson
2018-07-06  9:03       ` [Qemu-devel] [Qemu-ppc] " Mark Cave-Ayland
2018-08-05 11:41         ` Mark Cave-Ayland
2018-08-06  1:33           ` Richard Henderson
2018-07-04  3:31 ` [Qemu-devel] [PATCH for-3.1 0/7] target/ppc fp cleanups David Gibson
2018-07-04 13:42   ` Programmingkid
2018-07-05  0:09     ` David Gibson
2018-07-04 14:15 ` Alex Bennée
2018-07-04 14:49   ` Programmingkid
2018-07-04 15:39     ` Alex Bennée
2018-07-04 16:23       ` Programmingkid
2018-07-04 16:48         ` Alex Bennée

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).