From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrNpy-0000MO-44 for qemu-devel@nongnu.org; Mon, 02 Jun 2014 04:43:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WrNpo-0008SF-F9 for qemu-devel@nongnu.org; Mon, 02 Jun 2014 04:43:22 -0400 Received: from slb-mail5.epfl.ch ([2001:620:618:1e0:1:80b2:e034:1]:35843 helo=smtp5.epfl.ch) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrNpo-0008Qb-3k for qemu-devel@nongnu.org; Mon, 02 Jun 2014 04:43:12 -0400 Message-ID: <538C32DA.5000809@epfl.ch> Date: Mon, 02 Jun 2014 10:16:26 +0200 From: Jack Biggs MIME-Version: 1.0 References: <538847AC.6040108@epfl.ch> <5388B101.4010809@twiddle.net> In-Reply-To: <5388B101.4010809@twiddle.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Question about gen_jmp_tb List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson , qemu-devel@nongnu.org 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 >> 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~