From patchwork Wed Jun 30 18:32:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468722 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp613638jao; Wed, 30 Jun 2021 11:42:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3PYggcfCEmTxppPYE1JIYOrpLMz9nI4gL6D5t9Ngsh/abPmHthdbDGi4snIo1LKbIZvYb X-Received: by 2002:a25:9005:: with SMTP id s5mr4667668ybl.104.1625078529096; Wed, 30 Jun 2021 11:42:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625078529; cv=none; d=google.com; s=arc-20160816; b=TW7Yg/7ZSQRoYnJZqzUoFnDqjwp0rIFwwnWDhWYydm8UMtW5k6aCYhWvycW7u5qVZe SzjFFyhMpX33k9Fyf8djstVi6P14qprANlIda5+5Jno+2jGsoGHkHQvvCGRVlH/aSbjb SQwhPr8JsV/USGEcM20G9+FI13YhRcKzpx5bvMSWDopupLc8decGO8kwOC8YTO/4qOSa 4rzelNBFTzu1lXfrFUvXKtb5h5KRl8bHFvyrQ1VDwTvOBOe95FB6GfO9Wo3lecetzEPc JjUvCC2S2w+pKjxclm/lzpcL1ABsSqpx86exq+VASB6wxl2lwUUQlW4FhzWv11XrLyN1 Ypkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=pCw6fLSKCEavs1htLRAjDwkOxh3efrl1ZEcFJiTTMvg=; b=nabJAPqOMT8FSRC65xseuPmdVX8UwEHmk+bRhy+pbvysNqIFYUJerWX7cV6CiXfIyl LCt9tEwMmVUgY8VqoukvDL3uOCUrSwsIRYdN5IeK2u0tx8v5XekZRckXbwyf5t5WmVWX Q3urEZ7izdec0dDhy3g7YyTwo/IsHpuDuNQ3DKNSNummTao4tsroP3MxKkAwhLY8ZXX9 PW6Ruqkv0xuPCUPLeKXwIg+fo8tsJtdqOWPbtRmbyzaTCy/QeyfdE6h+cX74lZyu9HlS MocC4ZtGYiiqnWo+X2tZpZ6zuxydqaDkBVS0uPIyDi6xi5W5X051GiQgFc0PeO9CQwKM YmGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T9pCnmwc; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j8si19834936ybc.262.2021.06.30.11.42.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:42:09 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T9pCnmwc; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfA0-0000XH-Ja for patch@linaro.org; Wed, 30 Jun 2021 14:42:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0n-0005B3-Ec for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:37 -0400 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]:36508) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0k-00021T-Ry for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:37 -0400 Received: by mail-pg1-x52f.google.com with SMTP id e33so3206703pgm.3 for ; Wed, 30 Jun 2021 11:32:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pCw6fLSKCEavs1htLRAjDwkOxh3efrl1ZEcFJiTTMvg=; b=T9pCnmwcoDUHtHGFeDqFXX63m+YAFJJHtY9WnHm0bMMbojRAxQo8bKSYd/QwEiM9N0 W5rLbJkYHPJmlmUtlzf9xd1agh8RzedxsnpvQ6dqtgJUTBij8VDpZJ0sM9rSXCjbgkMP MGVdD+6pbarLJnZ9OiUmBZZHP5ifwcc+IqGIIr+Jo90BKrum9GyBE7MPfFk6ZtcINKJB +TNPyHRNxxkyHSL9xKSjE1KlglwB2cyNLVphrypv+G/71KBUik0vlyRnZVHiib5guReu 8vDKf979mTU3jSlWjkldTt1pJz4gCVjJj42t4kFOubbOhtDEJf1cjojyUw6heSLuio5+ 2FMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pCw6fLSKCEavs1htLRAjDwkOxh3efrl1ZEcFJiTTMvg=; b=jDW/WCa+0MQf0NWj6GJrbpQIoybUKbSYqgouNEyz9jUFX0Jz8zO7CABCxB3j6gqn3D ic4xkb86jAkjV5yEEyF88V3piwpzAU3DnVpXbVRKQzHAZxAeRkDib1DKyK6KMqsh+y1B Z7g4n2hfVB1OI7M04YfpEz4NrnLym/EVlhspYW0EEGV8vNQM3FzXV5lL/jGNMthn6saS TKnrGZerCBslwas+FElutVddmpIueYEAN3WNtFFDdM9WbVn0ZSUxmt6+c6Egc8nY+2J1 k2HIoNuHfudsykSGPGinSeUQRpcHoKqFKimABt8MR6pLWvmCs0dQYta2JYUdG5XidCWC 2nbg== X-Gm-Message-State: AOAM532DAm+kFm5zqve/Z1gcNwhzSEYU06CHal2+xemEIaLVjhqgrdhd mbLF3iQ8DXIjOy4a9/hh5q28uIAbEu92qg== X-Received: by 2002:a05:6a00:14c4:b029:303:fd5e:3800 with SMTP id w4-20020a056a0014c4b0290303fd5e3800mr37610153pfu.41.1625077953593; Wed, 30 Jun 2021 11:32:33 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:33 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 10/28] target/cris: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:08 -0700 Message-Id: <20210630183226.3290849-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52f.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: "Edgar E . Iglesias" Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The test for singlestepping is done in translator_use_goto_tb, so we may elide it from cris_tr_tb_stop. Cc: Edgar E. Iglesias Signed-off-by: Richard Henderson --- target/cris/translate.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/target/cris/translate.c b/target/cris/translate.c index 4cfe5c86d9..e33a3bb326 100644 --- a/target/cris/translate.c +++ b/target/cris/translate.c @@ -482,7 +482,7 @@ static void t_gen_swapr(TCGv d, TCGv s) static bool use_goto_tb(DisasContext *dc, target_ulong dest) { - return ((dest ^ dc->base.pc_first) & TARGET_PAGE_MASK) == 0; + return translator_use_goto_tb(&dc->base, dest); } static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest) @@ -3235,8 +3235,7 @@ static void cris_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu) * Use a conditional branch if either taken or not-taken path * can use goto_tb. If neither can, then treat it as indirect. */ - if (likely(!dc->base.singlestep_enabled) - && likely(!dc->cpustate_changed) + if (likely(!dc->cpustate_changed) && (use_goto_tb(dc, dc->jmp_pc) || use_goto_tb(dc, npc))) { TCGLabel *not_taken = gen_new_label();