qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: David Hildenbrand <david@redhat.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH v1] include/exec/helper-head.h: support "const void *" in helper calls
Date: Thu, 21 Feb 2019 10:25:35 -0800	[thread overview]
Message-ID: <4af8afe9-c489-0988-91ff-ea9d2fd1d17a@linaro.org> (raw)
In-Reply-To: <20190221093459.22547-1-david@redhat.com>

On 2/21/19 1:34 AM, David Hildenbrand wrote:
> Especially when dealing with out-of-line gvec helpers, it is often
> helpful to specify some vector pointers as constant. E.g. when
> we have two inputs and one output, marking the two inputs as consts
> pointers helps to avoid bugs.
> 
> Const pointers can be specified via "cptr", however behave in TCG just
> like ordinary pointers. We can specify helpers like:
> 
> DEF_HELPER_FLAGS_4(gvec_vbperm, TCG_CALL_NO_RWG, void, ptr, cptr, cptr, i32)
> 
> void HELPER(gvec_vbperm)(void *v1, const void *v2, const void *v3,
>                          uint32_t desc)
> 
> And make sure that here, only v1 will be written (as long as const is
> not casted away, of course).
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  include/exec/helper-head.h | 5 +++++
>  1 file changed, 5 insertions(+)

Queued, thanks.


r~

  reply	other threads:[~2019-02-21 18:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-21  9:34 [Qemu-devel] [PATCH v1] include/exec/helper-head.h: support "const void *" in helper calls David Hildenbrand
2019-02-21 18:25 ` Richard Henderson [this message]
2019-02-27 15:36 ` no-reply
2019-02-27 16:10   ` David Hildenbrand
2019-02-27 16:29     ` Paolo Bonzini

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=4af8afe9-c489-0988-91ff-ea9d2fd1d17a@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=david@redhat.com \
    --cc=pbonzini@redhat.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).