From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89AE9C07E9C for ; Thu, 8 Jul 2021 16:47:01 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 39FCA61457 for ; Thu, 8 Jul 2021 16:47:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 39FCA61457 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XAy-0006Bv-9D for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 12:47:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1Wcq-0002Tv-6L for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:11:44 -0400 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:46782) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1Wco-0008Aw-Gj for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:11:43 -0400 Received: by mail-ed1-x533.google.com with SMTP id s15so9246980edt.13 for ; Thu, 08 Jul 2021 09:11:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=49PI5WBY3Pvxqfof2TOhUpfgHH/EfMKzNfo7c+g6lRc=; b=D6Wnr89h5MG/aA53VBjotyrRPizqT971yL9eznGMqrmex5B9wf6z7uzdbLYfFJJDxS xnYahVWV2OBJgRW12G+cWWQRfhpe5nWuAuO3n2UJliZubvqkjwuTWiUhjw06ysbQ6ZYi HQfUiWgFIvsbNPIx6FELFfISs6lrtG55rRqRktQqPtreVulp49iPbDUj9/dIDS47+5j8 BP89NQB3bhfyfFu7DgrKn46lfEcZhfSkzQfF5ROfE4SW+geMBb8VozHcW6JFnoHbWlTO gjQojPUo9Ti69lUlKF8mal/vRzhlZfkLIJx6j0ehVsGtBAlIXCDPYbG2QZ1jF7qZrVt9 rW7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=49PI5WBY3Pvxqfof2TOhUpfgHH/EfMKzNfo7c+g6lRc=; b=np6X9/Vc4kMG/Gt8u7R8uRzs3Ydb2G1EqXWFlPUZtdfooPjrzYb21hf95+IAZK7UGA oK5INPc0QDEzs+DHieR2wDirwGWFNS61kpajkvXXB0yRjB7QOvnoCchYFu0Qoxl8feHq aNdunv+u/pA5K0g6C+iSU0aiMSTv4XwX/KguteUeKyDoRj0IBuht7EPBihGf4tipQ6D8 Qli6SYhnRrV7dXf66h/K052h6aD7VuFZ3YJenX+R2UDZd2eiWIFCBOfW5ixrb2/4o39x ag0imRr/3auvggFiHBgbgbi0OitOL4mLbdG13NF26O4RuUMTG4ht9X4+i9KL65RyZYOM O8bQ== X-Gm-Message-State: AOAM532/vu8RTWu+GSAezDpjj3aMwOa9sockweHUdWYprGEMWPIuNCco hZAq+uakYf6tK7PeYxePP2LlfYCeXiCtA8EsWg3/Vg== X-Google-Smtp-Source: ABdhPJwMYNViLTiCisdkrxFQC8FBeX6sRos/JDrW3MJSqMYh2H4TV+DsImOL0oh52MJeQTO6csJN1zPmKqBkddZ8oV0= X-Received: by 2002:aa7:c857:: with SMTP id g23mr38381346edt.100.1625760700942; Thu, 08 Jul 2021 09:11:40 -0700 (PDT) MIME-Version: 1.0 References: <20210630183226.3290849-1-richard.henderson@linaro.org> <20210630183226.3290849-6-richard.henderson@linaro.org> <88562e08-3d6c-3224-5d84-67e3ffd3774b@linaro.org> In-Reply-To: <88562e08-3d6c-3224-5d84-67e3ffd3774b@linaro.org> From: Peter Maydell Date: Thu, 8 Jul 2021 17:11:02 +0100 Message-ID: Subject: Re: [PATCH v2 05/28] target/arm: Use gen_jmp for ISB and SB To: Richard Henderson Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=peter.maydell@linaro.org; helo=mail-ed1-x533.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-arm , QEMU Developers Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Thu, 8 Jul 2021 at 17:04, Richard Henderson wrote: > > On 7/8/21 5:05 AM, Peter Maydell wrote: > > On Wed, 30 Jun 2021 at 19:47, Richard Henderson > > wrote: > >> > >> Using gen_goto_tb directly misses the single-step check. > >> > >> Cc: qemu-arm@nongnu.org > >> Signed-off-by: Richard Henderson > >> --- > >> target/arm/translate.c | 4 ++-- > >> 1 file changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/target/arm/translate.c b/target/arm/translate.c > >> index a0c6cfa902..8cd31feeaa 100644 > >> --- a/target/arm/translate.c > >> +++ b/target/arm/translate.c > >> @@ -8582,7 +8582,7 @@ static bool trans_ISB(DisasContext *s, arg_ISB *a) > >> * self-modifying code correctly and also to take > >> * any pending interrupts immediately. > >> */ > >> - gen_goto_tb(s, 0, s->base.pc_next); > >> + gen_jmp(s, s->base.pc_next); > >> return true; > >> } > >> > >> @@ -8596,7 +8596,7 @@ static bool trans_SB(DisasContext *s, arg_SB *a) > >> * for TCG; MB and end the TB instead. > >> */ > >> tcg_gen_mb(TCG_MO_ALL | TCG_BAR_SC); > >> - gen_goto_tb(s, 0, s->base.pc_next); > >> + gen_jmp(s, s->base.pc_next); > >> return true; > > > > Why isn't it enough here just to set is_jmp to DISAS_NEXT ? > > You mean DISAS_TOO_MANY? That would work, yes. > At the time I was just thinking of replacing one jump with another. You've implicitly answered my question, which is that the main translator loop code treats DISAS_NEXT as "keep adding insns to the TB" :-) It feels slightly like misuse to use DISAS_TOO_MANY, unless we renamed it to something like DISAS_END_TB (which is what it's actually doing). thanks -- PMM