From patchwork Mon Sep 5 11:54:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rabin Vincent X-Patchwork-Id: 9313549 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5662E607D3 for ; Mon, 5 Sep 2016 11:58:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4537A289B4 for ; Mon, 5 Sep 2016 11:58:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 383AE289F7; Mon, 5 Sep 2016 11:58:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E1D49289B4 for ; Mon, 5 Sep 2016 11:58:05 +0000 (UTC) Received: from localhost ([::1]:54026 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgsXN-0003gB-3J for patchwork-qemu-devel@patchwork.kernel.org; Mon, 05 Sep 2016 07:58:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgsTp-0000w7-68 for qemu-devel@nongnu.org; Mon, 05 Sep 2016 07:54:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bgsTi-0001Vs-Fq for qemu-devel@nongnu.org; Mon, 05 Sep 2016 07:54:24 -0400 Received: from bastet.se.axis.com ([195.60.68.11]:35738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgsTi-0001VM-9j for qemu-devel@nongnu.org; Mon, 05 Sep 2016 07:54:18 -0400 Received: from localhost (localhost [127.0.0.1]) by bastet.se.axis.com (Postfix) with ESMTP id A54591817E; Mon, 5 Sep 2016 13:54:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at bastet.se.axis.com Received: from bastet.se.axis.com ([IPv6:::ffff:127.0.0.1]) by localhost (bastet.se.axis.com [::ffff:127.0.0.1]) (amavisd-new, port 10024) with LMTP id j5W1EslJwCyP; Mon, 5 Sep 2016 13:54:14 +0200 (CEST) Received: from boulder.se.axis.com (boulder.se.axis.com [10.0.2.104]) by bastet.se.axis.com (Postfix) with ESMTP id 4B6E218180; Mon, 5 Sep 2016 13:54:14 +0200 (CEST) Received: from boulder.se.axis.com (localhost [127.0.0.1]) by postfix.imss71 (Postfix) with ESMTP id 356F11BA3; Mon, 5 Sep 2016 13:54:14 +0200 (CEST) Received: from thoth.se.axis.com (thoth.se.axis.com [10.0.2.173]) by boulder.se.axis.com (Postfix) with ESMTP id 27EB51BA1; Mon, 5 Sep 2016 13:54:14 +0200 (CEST) Received: from lnxartpec.se.axis.com (lnxartpec.se.axis.com [10.88.4.9]) by thoth.se.axis.com (Postfix) with ESMTP id 26568344; Mon, 5 Sep 2016 13:54:14 +0200 (CEST) Received: by lnxartpec.se.axis.com (Postfix, from userid 10564) id 2088A822C9; Mon, 5 Sep 2016 13:54:14 +0200 (CEST) From: Rabin Vincent To: edgar.iglesias@gmail.com Date: Mon, 5 Sep 2016 13:54:10 +0200 Message-Id: <1473076452-19795-7-git-send-email-rabin.vincent@axis.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1473076452-19795-1-git-send-email-rabin.vincent@axis.com> References: <1473076452-19795-1-git-send-email-rabin.vincent@axis.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 195.60.68.11 Subject: [Qemu-devel] [PATCH 7/9] target-cris: ignore prefix insns in singlestep X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans-Peter Nilsson , qemu-devel@nongnu.org, Rabin Vincent Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Hans-Peter Nilsson Don't count prefix instructions as separate when singlestepping. For example, for this following instruction 1ad8: a011 e00b move.d r0,[r1-96] before this patch, we get two register dumps: PC=1ad8 CCS=0 btaken=1 btarget=1ac6 cc_op=1 cc_src=3746 cc_dest=1 cc_result=ea2 cc_mask=0 $r0=00000000 $r1=00004360 $r2=00004308 $r3=0000026c $r4=00002076 $r5=00002022 $r6=00000000 $r7=00000000 $r8=00000000 $r9=00000ea2 $r10=00000002 $r11=00004308 $r12=00001080 $r13=00000ec0 $sp=0000bfd8 $pc=00001ad4 PC=1ada CCS=800 btaken=1 btarget=1ac6 cc_op=1 cc_src=3746 cc_dest=1 cc_result=ea2 cc_mask=0 $r0=00000000 $r1=00004360 $r2=00004308 $r3=0000026c $r4=00002076 $r5=00002022 $r6=00000000 $r7=00000000 $r8=00000000 $r9=00000ea2 $r10=00000002 $r11=00004308 $r12=00001080 $r13=00000ec0 $sp=0000bfd8 $pc=00001ad4 With the patch, we get only one: PC=1ad8 CCS=0 btaken=1 btarget=1ac6 cc_op=1 cc_src=3746 cc_dest=1 cc_result=ea2 cc_mask=0 $r0=00000000 $r1=00004360 $r2=00004308 $r3=0000026c $r4=00002076 $r5=00002022 $r6=00000000 $r7=00000000 $r8=00000000 $r9=00000ea2 $r10=00000002 $r11=00004308 $r12=00001080 $r13=00000ec0 $sp=0000bfd8 $pc=00001ad4 Signed-off-by: Hans-Peter Nilsson Signed-off-by: Rabin Vincent --- target-cris/translate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target-cris/translate.c b/target-cris/translate.c index a4512b5..c9b1e65 100644 --- a/target-cris/translate.c +++ b/target-cris/translate.c @@ -3262,7 +3262,8 @@ void gen_intermediate_code(CPUCRISState *env, struct TranslationBlock *tb) } } while (!dc->is_jmp && !dc->cpustate_changed && !tcg_op_buf_full() - && !singlestep + /* We don't count prefix insns as separate wrt. singlestep. */ + && (!singlestep || (dc->tb_flags & PFIX_FLAG)) && (dc->pc < next_page_start) && num_insns < max_insns);