qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 0/4] target/m68k: implement 680x0 FPU (part 3)


From: Laurent Vivier
Subject: [Qemu-devel] [PATCH 0/4] target/m68k: implement 680x0 FPU (part 3)
Date: Mon, 3 Jul 2017 18:23:24 +0200

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]