All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Lluís Vilanova" <vilanova@ac.upc.edu>
Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [RFC 0/2] tcg-icount: Add and use tcg_set_insn_param to update tcg insn params
Date: Mon, 11 Jan 2016 22:29:42 +0000	[thread overview]
Message-ID: <CAFEAcA8=hgjaxAtoCnNDmqHcASNipbWZn3zV_ZNqPn=DHKy43Q@mail.gmail.com> (raw)
In-Reply-To: <87twmj27ol.fsf@fimbulvetr.bsc.es>

On 11 January 2016 at 20:16, Lluís Vilanova <vilanova@ac.upc.edu> wrote:
> Great! I implemented a similar thing long time ago. In my case the machinery is
> completely hidden under the concept of "value promises" in TCG (i.e., the user
> does not need to know about TCG internals like tcg_op_buf_count):
>
>    // create promise
>    TCGv_promise_i32 imm_p;
>    TCGv_i32 imm = tcg_const_promise_i32(&imm_p); // akin to tcg_const_i32()
>    ...
>    // operate with promised immediate 'imm'
>    ...
>    // resolve promised value
>    tcg_set_promise_i32(imm_p, resolved_value);

I think this is definitely a nicer API if we're going to
have more than a very few uses -- gen_icount kind of gets
away with looking under the hood of the tcg data structures
because it's a sort of internal thing itself, but wider
use would definitely benefit from a more formal API.

thanks
-- PMM

  reply	other threads:[~2016-01-11 22:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-08 16:25 [Qemu-devel] [RFC 0/2] tcg-icount: Add and use tcg_set_insn_param to update tcg insn params Edgar E. Iglesias
2016-01-08 16:25 ` [Qemu-devel] [RFC 1/2] tcg: Add tcg_set_insn_param Edgar E. Iglesias
2016-01-08 16:25 ` [Qemu-devel] [RFC 2/2] gen-icount: Use tcg_set_insn_param Edgar E. Iglesias
2016-01-08 16:43 ` [Qemu-devel] [RFC 0/2] tcg-icount: Add and use tcg_set_insn_param to update tcg insn params Richard Henderson
2016-01-11 20:16 ` Lluís Vilanova
2016-01-11 22:29   ` Peter Maydell [this message]
2016-01-12 12:12     ` Lluís Vilanova
2016-01-12 13:52       ` Edgar E. Iglesias
2016-01-12 16:36         ` Lluís Vilanova

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='CAFEAcA8=hgjaxAtoCnNDmqHcASNipbWZn3zV_ZNqPn=DHKy43Q@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=edgar.iglesias@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=vilanova@ac.upc.edu \
    /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.