From: Laurent Desnogues <laurent.desnogues@gmail.com>
To: Richard Henderson <rth@twiddle.net>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] target-alpha: An approach to fp insn qualifiers
Date: Mon, 14 Dec 2009 21:11:00 +0100 [thread overview]
Message-ID: <761ea48b0912141211keb5bbben584d7fe76f44d78c@mail.gmail.com> (raw)
In-Reply-To: <4B267DBC.8050909@twiddle.net>
On Mon, Dec 14, 2009 at 7:02 PM, Richard Henderson <rth@twiddle.net> wrote:
> One of the other folks here (I'm sorry, I've forgotten who as I misplaced
> the mail) passed me a preliminary patch to tackle the missing fp rounding
> mode support. That patch added helpers to change the rounding mode, and
> injected them before and after every fp insn that forced a rounding mode.
That was me.
> After some thought I decided not to pursue this method for the simple reason
> that TCG does not have native floating point code generation.
I have started implementing TCG FP, but lack the time and desire to
complete it. The speed up was pretty good when running on an ARM
host with a fast FPU.
> Given that we
> have to call one helper routine to perform the operation, we might as well
> arrange for that same routine to handle the rounding mode manipulation.
>
> Indeed, the patch below doesn't just pass the rounding mode to the helper,
> but all of the qualifier fields. Thus we can avoid a large explosion of
> helper routines for addt{,/u,/su,sui}{,/c,/m,/d}.
I don't really like passing parts of opcodes to helpers, but as you say
that prevents explosion of helpers. OTOH you could do lazy calls to
helpers that set rounding modes with my approach of separating them
from computation.
I'll take a closer look at your patch tomorrow.
> To complete the patch I should add some symbolic defines for /s, /u, etc to
> avoid magic constants cluttering the code. I should figure out what I
> should pass to helper_excp for each arithmetic exception. I should actually
> implement the arithmetic exceptions.
>
> That said, these two patches are enough to pass the gcc testsuite with no
> regressions over native hardware.
Can you give SPECint 2K equake a try? The symptom was the presence
of many NaN's. If you don't have access to SPEC2K I'll try it.
Laurent
next prev parent reply other threads:[~2009-12-14 20:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-14 18:02 [Qemu-devel] target-alpha: An approach to fp insn qualifiers Richard Henderson
2009-12-14 20:11 ` Laurent Desnogues [this message]
2009-12-14 22:21 ` Richard Henderson
2009-12-15 0:31 ` Richard Henderson
2009-12-15 3:50 ` Richard Henderson
2009-12-15 11:31 ` Laurent Desnogues
2009-12-15 16:17 ` Richard Henderson
2009-12-15 17:32 ` Vince Weaver
2009-12-17 17:18 ` Vince Weaver
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=761ea48b0912141211keb5bbben584d7fe76f44d78c@mail.gmail.com \
--to=laurent.desnogues@gmail.com \
--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).