From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaLab-0003AY-C0 for qemu-devel@nongnu.org; Fri, 11 Sep 2015 06:29:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZaLaY-0005k1-7A for qemu-devel@nongnu.org; Fri, 11 Sep 2015 06:29:53 -0400 Received: from mail-la0-x236.google.com ([2a00:1450:4010:c03::236]:36505) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaLaX-0005j0-VM for qemu-devel@nongnu.org; Fri, 11 Sep 2015 06:29:50 -0400 Received: by lanb10 with SMTP id b10so44794456lan.3 for ; Fri, 11 Sep 2015 03:29:48 -0700 (PDT) References: <1441173123-25540-1-git-send-email-rth@twiddle.net> <1441173123-25540-19-git-send-email-rth@twiddle.net> From: Sergey Fedorov Message-ID: <55F2AD1A.2080808@gmail.com> Date: Fri, 11 Sep 2015 13:29:46 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 18/20] tcg: Save insn data and use it in cpu_restore_state_from_tb List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , Richard Henderson Cc: dl.soluz@gmx.net, QEMU Developers , Aurelien Jarno , Artyom Tarasenko On 10.09.2015 16:49, Peter Maydell wrote: >> @@ -2406,6 +2411,8 @@ static inline int tcg_gen_code_common(TCGContext *s, >> > check_regs(s); >> > #endif >> > } >> > + tcg_debug_assert(num_insns >= 0); > This is claiming that every TB will have at least one insn_start, > right? I think that most targets will violate that in the breakpoint > case, because the "if we have a bp for this insn then generate a > debug insn and break out of the loop" code is before the call > to tcg_gen_insn_start(). > > We should probably assert that num_insns < TCG_MAX_INSNS while > we're here. > BTW, such skipping of instruction generation seems to be the cause of getting a confusing "Disassembler disagrees with translator over instruction" message in qemu log.