From: Thomas Huth <huth@tuxfamily.org>
To: Laurent Vivier <laurent@vivier.eu>, qemu-devel@nongnu.org
Cc: Aurelien Jarno <aurelien@aurel32.net>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH v4 5/7] target-m68k: use floatx80 internally
Date: Tue, 13 Jun 2017 06:48:21 +0200 [thread overview]
Message-ID: <221c6711-d46f-2fcf-6091-f1f3340664f7@tuxfamily.org> (raw)
In-Reply-To: <20170611231633.32582-6-laurent@vivier.eu>
On 12.06.2017 01:16, Laurent Vivier wrote:
> Coldfire uses float64, but 680x0 use floatx80.
> This patch introduces the use of floatx80 internally
> and enables 680x0 80bits FPU.
>
> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
> ---
> target/m68k/cpu.c | 9 +-
> target/m68k/cpu.h | 6 +-
> target/m68k/fpu_helper.c | 85 +++----
> target/m68k/helper.c | 12 +-
> target/m68k/helper.h | 37 +--
> target/m68k/qregs.def | 1 -
> target/m68k/translate.c | 568 +++++++++++++++++++++++++++++++----------------
> 7 files changed, 464 insertions(+), 254 deletions(-)
>
> diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c
> index f068922..435456f 100644
> --- a/target/m68k/cpu.c
> +++ b/target/m68k/cpu.c
> @@ -49,6 +49,8 @@ static void m68k_cpu_reset(CPUState *s)
> M68kCPU *cpu = M68K_CPU(s);
> M68kCPUClass *mcc = M68K_CPU_GET_CLASS(cpu);
> CPUM68KState *env = &cpu->env;
> + floatx80 nan = floatx80_default_nan(NULL);
> + int i;
>
> mcc->parent_reset(s);
>
> @@ -57,7 +59,12 @@ static void m68k_cpu_reset(CPUState *s)
> env->sr = 0x2700;
> #endif
> m68k_switch_sp(env);
> - /* ??? FP regs should be initialized to NaN. */
> + for (i = 0; i < 8; i++) {
> + env->fregs[i].d = nan;
> + }
> + env->fpcr = 0;
> + env->fpsr = 0;
> +
Maybe move such non-related hunks to a separate patch? This patch here
is already big enough...
Thomas
next prev parent reply other threads:[~2017-06-13 4:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-11 23:16 [Qemu-devel] [PATCH v4 0/7] target-m68k: implement 680x0 FPU Laurent Vivier
2017-06-11 23:16 ` [Qemu-devel] [PATCH v4 1/7] softfloat: define 680x0 specific values Laurent Vivier
2017-06-11 23:16 ` [Qemu-devel] [PATCH v4 2/7] target-m68k: move FPU helpers to fpu_helper.c Laurent Vivier
2017-06-11 23:16 ` [Qemu-devel] [PATCH v4 3/7] target-m68k: define ext_opsize Laurent Vivier
2017-06-11 23:16 ` [Qemu-devel] [PATCH v4 4/7] target-m68k: move fmove CR to a function Laurent Vivier
2017-06-12 16:13 ` Richard Henderson
2017-06-12 17:56 ` Laurent Vivier
2017-06-12 18:37 ` Richard Henderson
2017-06-12 19:12 ` Philippe Mathieu-Daudé
2017-06-11 23:16 ` [Qemu-devel] [PATCH v4 5/7] target-m68k: use floatx80 internally Laurent Vivier
2017-06-13 4:48 ` Thomas Huth [this message]
2017-06-19 20:53 ` Richard Henderson
2017-06-19 21:03 ` Laurent Vivier
2017-06-19 21:42 ` Laurent Vivier
2017-06-19 22:04 ` Richard Henderson
2017-06-11 23:16 ` [Qemu-devel] [PATCH v4 6/7] target-m68k: define 96bit FP registers for gdb on 680x0 Laurent Vivier
2017-06-11 23:16 ` [Qemu-devel] [PATCH v4 7/7] target-m68k: add FPCR and FPSR Laurent Vivier
2017-06-19 21:16 ` Richard Henderson
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=221c6711-d46f-2fcf-6091-f1f3340664f7@tuxfamily.org \
--to=huth@tuxfamily.org \
--cc=aurelien@aurel32.net \
--cc=laurent@vivier.eu \
--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).