[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: |
Lluís Vilanova |
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 17:36:46 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Edgar E Iglesias writes:
> 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.
Ok, then I'll rebase it on Friday.
Cheers,
Lluis