Received: from eggs.gnu.org ([2001:4830:134:3::10]:55380) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJ1wE-0007Tc-Im for qemu-devel@nongnu.org; Tue, 12 Jan 2016 11:36:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJ1w9-0007mO-HM for qemu-devel@nongnu.org; Tue, 12 Jan 2016 11:36:54 -0500 Received: from roura.ac.upc.es ([147.83.33.10]:60383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJ1w9-0007lj-72 for qemu-devel@nongnu.org; Tue, 12 Jan 2016 11:36:49 -0500 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= References: <1452270356-26373-1-git-send-email-edgar.iglesias@gmail.com> <87twmj27ol.fsf@fimbulvetr.bsc.es> <87si23xahe.fsf@fimbulvetr.bsc.es> <20160112135224.GC29396@toto> Date: Tue, 12 Jan 2016 17:36:46 +0100 In-Reply-To: <20160112135224.GC29396@toto> (Edgar E. Iglesias's message of "Tue, 12 Jan 2016 14:52:24 +0100") Message-ID: <87twmiwy8x.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC 0/2] tcg-icount: Add and use tcg_set_insn_param to update tcg insn params List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Edgar E. Iglesias" Cc: Peter Maydell , QEMU Developers , Richard Henderson Edgar E Iglesias writes: > On Tue, Jan 12, 2016 at 01:12:29PM +0100, Llu=C3=ADs Vilanova wrote: >> Peter Maydell writes: >>=20 >> > On 11 January 2016 at 20:16, Llu=C3=ADs Vilanova = wrote: >> >> Great! I implemented a similar thing long time ago. In my case the ma= chinery 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): >> >>=20 >> >> // create promise >> >> TCGv_promise_i32 imm_p; >> >> TCGv_i32 imm =3D 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); >>=20 >> > 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. >>=20 >> 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