From: Avi Kivity <avi@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Laurent Desnogues <laurent.desnogues@gmail.com>,
Jan Kiszka <jan.kiszka@siemens.com>,
Mulyadi Santosa <mulyadi.santosa@gmail.com>,
qemu-devel <qemu-devel@nongnu.org>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH] tcg: Remove stack protection from helper functions
Date: Mon, 26 Sep 2011 23:26:39 +0300 [thread overview]
Message-ID: <4E80DFFF.8050403@redhat.com> (raw)
In-Reply-To: <CAFEAcA-kkobH763sPVs3zbgh6J9LTsJjo5XkEqHC5g3TDwaMMg@mail.gmail.com>
On 09/26/2011 11:19 PM, Peter Maydell wrote:
> On 26 September 2011 20:52, Avi Kivity<avi@redhat.com> wrote:
> > Why do floating point ops need helpers? At least if all the edge cases
> > match? (i.e. NaNs and denormals)
>
> The answer is that the edge cases basically never match.
Surely they do when host == target. Although there you can virtualize.
> No CPU
> architecture does handling of NaNs and input denormals and output
> denormals and underflow checks and all the rest of it in exactly
> the same way as anybody else. (In particular x86 is pretty crazy,
> which is unfortunate given that it's the most significant host
> arch at the moment.) So any kind of TCG native floating point
> support would probably have to translate to "check if either
> input is a special case; if not, try the op; check if the output
> was a special case; if any of those checks fired, back off to
> the softfloat helper function". Which is quite a lot of inline
> code, and also annoyingly bouncing between fp ops and integer
> bitpattern checks on the fp values.
>
Alternatively, configure the fpu to trap on these cases, and handle them
in a slow path. At least x86 sse allows this (though perhaps not for
"quiet NaN"s?
Does it matter in practice? Perhaps we can have a fast-and-loose mode
for the fpu (gcc does).
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
next prev parent reply other threads:[~2011-09-26 20:26 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-26 7:46 [Qemu-devel] [PATCH] tcg: Remove stack protection from helper functions Jan Kiszka
2011-09-26 8:01 ` Mulyadi Santosa
2011-09-26 8:15 ` Laurent Desnogues
2011-09-26 17:41 ` Avi Kivity
2011-09-26 19:43 ` Richard Henderson
2011-09-26 19:52 ` Avi Kivity
2011-09-26 19:53 ` Richard Henderson
2011-09-26 20:20 ` Avi Kivity
2011-09-26 20:19 ` Peter Maydell
2011-09-26 20:26 ` Avi Kivity [this message]
2011-09-27 4:29 ` Andi Kleen
2011-09-27 7:58 ` Peter Maydell
2011-09-26 10:51 ` [Qemu-devel] [PATCH v2] " Jan Kiszka
2011-09-26 11:33 ` Peter Maydell
2011-09-26 11:43 ` Jan Kiszka
2011-09-26 11:56 ` Peter Maydell
2011-09-26 17:22 ` Blue Swirl
2011-09-26 17:33 ` Jan Kiszka
2011-09-26 18:20 ` Blue Swirl
2011-09-26 18:25 ` Jan Kiszka
2011-09-26 18:40 ` Blue Swirl
2011-09-26 19:08 ` Peter Maydell
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=4E80DFFF.8050403@redhat.com \
--to=avi@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=laurent.desnogues@gmail.com \
--cc=mulyadi.santosa@gmail.com \
--cc=peter.maydell@linaro.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.