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 <vilan...@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.
>> 
>> 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

Reply via email to