qemu-devel
[Top][All Lists]
Advanced

[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: Peter Maydell
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

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.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]