From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44963) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bja43-0007YC-5V for qemu-devel@nongnu.org; Mon, 12 Sep 2016 18:51:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bja3z-0001OV-24 for qemu-devel@nongnu.org; Mon, 12 Sep 2016 18:50:58 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:34448) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bja3y-0001OH-PY for qemu-devel@nongnu.org; Mon, 12 Sep 2016 18:50:54 -0400 Received: by mail-lf0-f67.google.com with SMTP id k12so6367928lfb.1 for ; Mon, 12 Sep 2016 15:50:54 -0700 (PDT) Date: Tue, 13 Sep 2016 00:49:51 +0200 From: "Edgar E. Iglesias" Message-ID: <20160912224951.GL16305@toto> References: <1473076452-19795-1-git-send-email-rabin.vincent@axis.com> <1473076452-19795-7-git-send-email-rabin.vincent@axis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1473076452-19795-7-git-send-email-rabin.vincent@axis.com> Subject: Re: [Qemu-devel] [PATCH 7/9] target-cris: ignore prefix insns in singlestep List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Rabin Vincent Cc: qemu-devel@nongnu.org, Hans-Peter Nilsson , Rabin Vincent On Mon, Sep 05, 2016 at 01:54:10PM +0200, Rabin Vincent wrote: > 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 Hi, A concern I have is that we can't guard against all split prefix sequences (e.g at page boundaries or with icount). So it may be more confusing to see the prefix insns sometimes than every time. Perhaps we should more clearly be showing prefix state in the logs? BTW, are you guys doing post-processing on this or is it only for human inspection? Cheers, Edgar > > 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); > > -- > 2.1.4 >