From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53832) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaLqm-0001T5-EO for qemu-devel@nongnu.org; Fri, 11 Sep 2015 06:46:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZaLqj-0006e4-7W for qemu-devel@nongnu.org; Fri, 11 Sep 2015 06:46:36 -0400 Received: from mail-lb0-x230.google.com ([2a00:1450:4010:c04::230]:34473) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaLqi-0006d8-Vj for qemu-devel@nongnu.org; Fri, 11 Sep 2015 06:46:33 -0400 Received: by lbbmp1 with SMTP id mp1so37453763lbb.1 for ; Fri, 11 Sep 2015 03:46:32 -0700 (PDT) References: <1441173123-25540-1-git-send-email-rth@twiddle.net> <1441173123-25540-19-git-send-email-rth@twiddle.net> <55F2AD1A.2080808@gmail.com> From: Sergey Fedorov Message-ID: <55F2B106.1060601@gmail.com> Date: Fri, 11 Sep 2015 13:46:30 +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 Cc: dl.soluz@gmx.net, Artyom Tarasenko , QEMU Developers , Aurelien Jarno , Richard Henderson On 11.09.2015 13:32, Peter Maydell wrote: > On 11 September 2015 at 11:29, Sergey Fedorov wrote: >> 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. > ...I'd been meaning to try to track down what was provoking that :-) Seems it was wrong pc increment when handling a fired breakpoint. Best, Sergey