From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrObo-0006GJ-BG for qemu-devel@nongnu.org; Mon, 02 Jun 2014 05:32:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WrObf-0007av-St for qemu-devel@nongnu.org; Mon, 02 Jun 2014 05:32:48 -0400 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:37260 helo=socrates.bennee.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrObf-0007aa-N4 for qemu-devel@nongnu.org; Mon, 02 Jun 2014 05:32:39 -0400 References: <538847AC.6040108@epfl.ch> <5388B101.4010809@twiddle.net> <538C32DA.5000809@epfl.ch> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <538C32DA.5000809@epfl.ch> Date: Mon, 02 Jun 2014 10:32:42 +0100 Message-ID: <87wqczsll1.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] Question about gen_jmp_tb List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jack Biggs Cc: qemu-devel@nongnu.org, Richard Henderson Jack Biggs writes: > Hi Richard, thanks for your help. > > Which instruction, then, I should add my gen_helper to in order for it > to be called at the end of each basic block, as I've previously stated? > Is there a way I can generically have this change apply to every target? > > Jack > > On 05/30/2014 06:25 PM, Richard Henderson wrote: >> On 05/30/2014 01:56 AM, Jack Biggs wrote: >>> Hi all, >>> >>> I'm trying to add some arbitrary code to the end of each translation block, and >>> I wanted to confirm my suspicion that each translation block ends in >>> a jmp When you say arbitrary code what do you mean? Are you wanting to put backend specific code there or a common post-amble of tcg ops? Can you give a bit more detail about your use case? >>> instruction, and that each translation block ends (or jumps to another TB) with >>> the call to gen_jmp_tb. My guest is i386, but if this is architecture-specific >>> I'd like to know more about per-target semantics. >> No, not every tb ends with gen_jmp_tb. Indeed, only those for which we have an >> immediate address end that way. Plenty of tb's end with indirect branches, or >> for a variety of other reasons. >> >> Certainly gen_jmp_tb is specific to the i386 translator. >> >> >> r~ -- Alex Bennée