[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 0/2] tcg-icount: Add and use tcg_set_insn_param to
From: |
Edgar E. Iglesias |
Subject: |
Re: [Qemu-devel] [RFC 0/2] tcg-icount: Add and use tcg_set_insn_param to update tcg insn params |
Date: |
Tue, 12 Jan 2016 14:52:24 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Jan 12, 2016 at 01:12:29PM +0100, Lluís Vilanova wrote:
> Peter Maydell writes:
>
> > On 11 January 2016 at 20:16, Lluís Vilanova <address@hidden> 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.
>
> If this is not time-critical, I can prepare an updated patch by Friday, or let
> Edgar do it. Both are fine by me.
It would be awesome if you could rebase your series.
Thanks Lluis
Cheers,
Edgar