From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Richard Henderson <rth@twiddle.net>
Cc: David Gibson <david@gibson.dropbear.id.au>,
qemu-devel <qemu-devel@nongnu.org>,
qemu-ppc@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 28/32] ppc: Avoid double translation for lvx/lvxl/stvx/stvxl
Date: Fri, 29 Jul 2016 16:56:59 +1000 [thread overview]
Message-ID: <1469775419.5978.275.camel@kernel.crashing.org> (raw)
In-Reply-To: <1469774541.5978.265.camel@kernel.crashing.org>
On Fri, 2016-07-29 at 16:42 +1000, Benjamin Herrenschmidt wrote:
> On Fri, 2016-07-29 at 09:46 +0530, Richard Henderson wrote:
> >
> > The form of declaration you're using takes care of that. In order
> > to
> > not clobber, you have to use DEF_HELPER_FLAGS with *NO_RWG*.
>
> BTW. Is that stuff (and the various flags here) somewhat documented
> anywhere ? :-)
More specifically, looking at the flags defined:
#define TCG_CALL_NO_READ_GLOBALS 0x0010
/* Helper does not write globals */
#define TCG_CALL_NO_WRITE_GLOBALS 0x0020
/* Helper can be safely suppressed if the return value is not used. */
#define TCG_CALL_NO_SIDE_EFFECTS 0x0040
I assume by "globals" that means things defined
with tcg_global_mem_new_i32() correct ?
So I can't do something like set TCG_CALL_NO_RWG (nor TCG_CALL_NO_WG)
on something like dcbz because it can take an exception, correct ?
Now if a helper doens't access env->gpr/spr/... but instead take
everything as in/out arguments and cannot take an exception, we can use
these, right ?
I notice that sadly, all of the vector ops are helper with full
clobbers, because I assume, the "avr" is passed as pointer due to the
lack of an int128 type in TCG correct ?
Is the only option here to go down the int128 path or would there be a
reasonable way to add a mechanism for more fine grained clobbers ?
Another reason why I think that might be handy is that a whole lot of
helpers basically have full clobbers simply because they update a CR
bit (or fscr for FP ops). It would be nice to be able to mark just
that clobbered.
Maybe by declaring up to a handful of "globals" special, assigning them
an index and having a special clobber bits corresponding to them in the
flags ?
Cheers,
Ben.
next prev parent reply other threads:[~2016-07-29 6:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <579ad8bd.8481620a.89e78.f1ce@mx.google.com>
2016-07-29 4:44 ` [Qemu-devel] [PATCH 28/32] ppc: Avoid double translation for lvx/lvxl/stvx/stvxl Benjamin Herrenschmidt
2016-07-29 6:42 ` Benjamin Herrenschmidt
2016-07-29 6:56 ` Benjamin Herrenschmidt [this message]
2016-07-29 12:30 ` Richard Henderson
2016-07-29 12:37 ` Richard Henderson
2016-07-29 6:58 ` Benjamin Herrenschmidt
2016-07-26 22:20 [Qemu-devel] [PATCH 01/32] ppc: Fix fault PC reporting for lve*/stve* VMX instructions Benjamin Herrenschmidt
2016-07-26 22:21 ` [Qemu-devel] [PATCH 28/32] ppc: Avoid double translation for lvx/lvxl/stvx/stvxl Benjamin Herrenschmidt
2016-07-29 0:49 ` Richard Henderson
2016-07-29 2:13 ` Benjamin Herrenschmidt
2016-07-29 3:34 ` David Gibson
2016-07-29 4:40 ` Benjamin Herrenschmidt
2016-07-29 4:58 ` Benjamin Herrenschmidt
2016-07-29 5:42 ` David Gibson
2016-07-29 9:00 ` Benjamin Herrenschmidt
2016-07-29 12:43 ` 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=1469775419.5978.275.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=david@gibson.dropbear.id.au \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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.