From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48516) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhOIO-0000Zz-7V for qemu-devel@nongnu.org; Tue, 06 Sep 2016 17:52:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhOIL-00044o-5Q for qemu-devel@nongnu.org; Tue, 06 Sep 2016 17:52:44 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:36340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhOIK-00044k-Tn for qemu-devel@nongnu.org; Tue, 06 Sep 2016 17:52:41 -0400 Received: by mail-wm0-x242.google.com with SMTP id l65so12942453wmf.3 for ; Tue, 06 Sep 2016 14:52:40 -0700 (PDT) Date: Tue, 6 Sep 2016 23:52:38 +0200 From: "Edgar E. Iglesias" Message-ID: <20160906215238.GA1306@toto> References: <1473076452-19795-1-git-send-email-rabin.vincent@axis.com> <1473076452-19795-5-git-send-email-rabin.vincent@axis.com> <8dce9f44-9b7e-9225-c08e-ea6f09bb33f9@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8dce9f44-9b7e-9225-c08e-ea6f09bb33f9@twiddle.net> Subject: Re: [Qemu-devel] [PATCH 5/9] target-cris: sync CC state at load/stores. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Rabin Vincent , "Edgar E. Iglesias" , qemu-devel@nongnu.org, Rabin Vincent On Mon, Sep 05, 2016 at 12:02:14PM -0700, Richard Henderson wrote: > On 09/05/2016 04:54 AM, Rabin Vincent wrote: > >From: "Edgar E. Iglesias" > > > >Icount may choose to abort and recompile a TB at any load/store. We > >need to sync the CC state at these insns. > > > >Signed-off-by: Edgar E. Iglesias > >Signed-off-by: Rabin Vincent > >--- > > target-cris/translate.c | 9 +++++++++ > > target-cris/translate_v10.c | 3 +++ > > 2 files changed, 12 insertions(+) > > > >diff --git a/target-cris/translate.c b/target-cris/translate.c > >index f4a8d7d..c280e24 100644 > >--- a/target-cris/translate.c > >+++ b/target-cris/translate.c > >@@ -1098,6 +1098,9 @@ static void gen_load64(DisasContext *dc, TCGv_i64 dst, TCGv addr) > > { > > int mem_index = cpu_mmu_index(&dc->cpu->env, false); > > > >+ /* Due to icount, we need to update the CC flags on load/stores. */ > >+ cris_evaluate_flags(dc); > >+ > > This is not the proper way to handle this. You should arrange to sync the > CC flags in restore_state_to_opc. There are plenty of examples in the tree > you can examine. It looks like there's plenty of room for cleanup for cris > here. > Thanks, agreed. Rabin, most of the CRIS patches that I left in the AXIS tree without upstreaming need more work. I don't mind you posting them but keep in mind that there's not much that can go up without tidy up. Best regards, Edgar