From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org
Cc: Aurelien Jarno <aurelien@aurel32.net>,
Richard Henderson <rth@twiddle.net>,
Laurent Vivier <laurent@vivier.eu>
Subject: [Qemu-devel] [PATCH 0/4] target/m68k: implement 680x0 FPU (part 3)
Date: Mon, 3 Jul 2017 18:23:24 +0200 [thread overview]
Message-ID: <20170703162328.24474-1-laurent@vivier.eu> (raw)
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
next reply other threads:[~2017-07-03 16:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-03 16:23 Laurent Vivier [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170703162328.24474-1-laurent@vivier.eu \
--to=laurent@vivier.eu \
--cc=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).