qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/4] target/m68k: implement 680x0 FPU (part 3)
@ 2017-07-03 16:23 Laurent Vivier
  2017-07-03 16:23 ` [Qemu-devel] [PATCH 1/4] softfloat: use floatx80_infinity in softfloat Laurent Vivier
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Laurent Vivier @ 2017-07-03 16:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: Aurelien Jarno, Richard Henderson, Laurent Vivier

We start by defining the floatx80 value of infinity on m68k, as
it differs from the standard one (0x0000000000000000 instead of
0x8000000000000000). This patch superseds the patch I have
already sent that defines a "floatx80_default_inf" whereas
we have already a "floatx80_infinity": we should use
it instead.

Then we define the trigonometric function using the libm
functions. To do that, we need to introduce functions
to convert to and from floatx80 and "long double".
We use ldexpl()/frexpl() to extract exponent and
mantissa from the "long double" value. The function
to convert is also used in m68k_cpu_dump_state() to
display the value of FPU registers.

In the same way, we define fmod/frem using libm
fmodl() and remainderl().

And finally, we define fgetexp/fgetman/fscale.
For these three functions, I've tried to compare
the result with a real 68040 as most as possible.

Laurent Vivier (4):
  softfloat: use floatx80_infinity in softfloat
  target/m68k: add FPU trigonometric instructions
  target/m68k: add fmod/frem
  target-m68k: add fscale, fgetman and fgetexp

 fpu/softfloat-specialize.h |  14 ++
 fpu/softfloat.c            |  38 +++--
 include/fpu/softfloat.h    |   9 +-
 target/m68k/cpu.h          |   2 +
 target/m68k/fpu_helper.c   | 369 +++++++++++++++++++++++++++++++++++++++++++++
 target/m68k/helper.h       |  22 +++
 target/m68k/translate.c    |  88 +++++++++--
 7 files changed, 513 insertions(+), 29 deletions(-)

-- 
2.9.4

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

end of thread, other threads:[~2017-07-04  0:07 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-03 16:23 [Qemu-devel] [PATCH 0/4] target/m68k: implement 680x0 FPU (part 3) Laurent Vivier
2017-07-03 16:23 ` [Qemu-devel] [PATCH 1/4] softfloat: use floatx80_infinity in softfloat Laurent Vivier
2017-07-03 18:06   ` Richard Henderson
2017-07-03 16:23 ` [Qemu-devel] [PATCH 2/4] target/m68k: add FPU trigonometric instructions Laurent Vivier
2017-07-03 19:11   ` Richard Henderson
2017-07-03 19:17     ` Richard Henderson
2017-07-03 16:23 ` [Qemu-devel] [PATCH 3/4] target/m68k: add fmod/frem Laurent Vivier
2017-07-03 19:14   ` Richard Henderson
2017-07-03 16:23 ` [Qemu-devel] [PATCH 4/4] target-m68k: add fscale, fgetman and fgetexp Laurent Vivier
2017-07-03 19:26   ` Richard Henderson
2017-07-03 19:50     ` Laurent Vivier
2017-07-03 20:31       ` Richard Henderson
2017-07-04  0:07         ` Laurent Vivier

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).