From patchwork Wed Jun 30 18:32:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468729 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp618211jao; Wed, 30 Jun 2021 11:49:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnPDjklVNnAzqqB0hg0Uut5dMLg9Xpu7BgacCVt6ZlfKTHd2YdXgjthSb9wO8ZuhxcM0xJ X-Received: by 2002:a67:14c1:: with SMTP id 184mr33396837vsu.38.1625078947057; Wed, 30 Jun 2021 11:49:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625078947; cv=none; d=google.com; s=arc-20160816; b=SFBiW/5X1/v7qDyHkBTfOeJrgAGtyz/Tg/6lLUcU+7NGbX+inH5gICt9c55gZlq3B1 HNENa7FdvB9xtOa04bJuVWdGNDRk0ZtE4bj+raJ6NzKkIe2oX3mkPzmOGjAXOWviErC1 agM1/g6UhakT6S24jsTlPSSsag50BdTY2Ffg6CsiFd7zCau1nB2FW96BgP4EHapF9Sr+ +EAL83+TvbF6nfFvxjswJN8K7wNd8bdp0x4dMUME8h5G9NqtvW2V4g9Q1tYX54ioIDVf lcETnZnY5fG6/hrYk/7Cekx6fJ09Gy+IuvnbMMhSdQSGAZtBmHJFh0/UZBoC6rJMEsA6 VzFQ== 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=VwYP1FR59CBcY4SbMQQt/obAK3lfRhuxdMKBAeBeX6Y=; b=niUfqa7oPfTlwBy+LTmZKcN3znfWZ+iTxY7NhQhYlGMAGudeU/qlZoaS5ErO4/IUuc 0uI9VkzyBDnm3cZXVUdZVcJJ/nanvAMOdSqUho+b8W/XaQbBs/aO4pViIhnPmuCSgvG1 R69/PiDWGcqwGC4001M6BEC58c4kMFirTz7SyO5I96xcEBsDfNcB/Rs4yvgiMPfD92dB S2u/oEj88VngvS8g2v88jWsMMtRE2DHtdGIWuUg5iB1tXuAxJNZIvzon7IWIlVVuNVkw CY9SrYDx6Jg6pMWXbKdoh1hpaVYbILdzAeM1W395sqtDzrD1Kc4krSeCfAAZ+ab/+x7T qdKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IQGFsnUe; 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 h14si16845847uap.80.2021.06.30.11.49.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:49:07 -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=IQGFsnUe; 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]:44014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfGk-00041W-Ev for patch@linaro.org; Wed, 30 Jun 2021 14:49:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45400) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0l-00057X-2T for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:35 -0400 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]:34542) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0i-0001zX-Rg for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:34 -0400 Received: by mail-pg1-x52d.google.com with SMTP id a7so3214040pga.1 for ; Wed, 30 Jun 2021 11:32:32 -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=VwYP1FR59CBcY4SbMQQt/obAK3lfRhuxdMKBAeBeX6Y=; b=IQGFsnUezhZRccJzGFEYPeseANzTao5sqQZMZMtSRL/Qg+rcwtyOxcS3yNXAMG81Kc /ZSOasmj3d7h3DVxO3piWO/DuSnjXT9nJhMId92Gd6MM3fvHXjrU7cfit9QdjZ2Jb3Ju NOixqpmhIq6ELWkpWBCBkqy7wMCLla4vssrpdIE/s7zFd/YYeobDxBdODENY77iUi9FL bHDNw1E7oilsagI/y83GG612HQcPSM58HZZb79huE69SCPaiWJRIfJ6kYyUBLAV6IEGk 4lApAil34P82PpiycU+99nnYqpSsClXpDThI4Q2B5BTrxhAzjY/jR8CeDlHg92fwMx8j 7S7Q== 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=VwYP1FR59CBcY4SbMQQt/obAK3lfRhuxdMKBAeBeX6Y=; b=NKRDDzc1IevFzfYyK6XjkFvk3WnkvV+JHhMIa4t92maNNOnaERyWiUFdtqi1IP8GdW i1uAlukhTvDcT2T58ftw8sPj6vaEomSM7kN+ikFVsmlcC1bn4zCmOGfF0Vif59o4ZJ91 Pz5LeX1J6ySeim2ViVLDsK92aSQWmP3vL8mdV17UVtuYhNUdkMvIbTXyjioffKIsip6n mxEXTCg2oJSqyKz2uOBA7WfwasY/LW53GLUzDVaIio/mROG0SvZ/HX4CsCZcXs3xqrrs uTlWfp+rvjDr+MHAXshWb4uKftmQUwiykZB5arJmIdLRzDW67pUa2nkkS3FnXSuX2jMw ubFg== X-Gm-Message-State: AOAM530/3lTIe6Yvg5xVgO2Iw/h5/VKH0bCPp2yw/AaENa2s1BWH0FG0 4SAXYrmvFf3oEahWiUsDPk8Zk1Y8YYqYjA== X-Received: by 2002:a05:6a00:1496:b029:308:29bc:6d4d with SMTP id v22-20020a056a001496b029030829bc6d4dmr34939302pfu.14.1625077951532; Wed, 30 Jun 2021 11:32:31 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:31 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 06/28] target/arm: Use translator_use_goto_tb for aarch64 Date: Wed, 30 Jun 2021 11:32:04 -0700 Message-Id: <20210630183226.3290849-7-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::52d; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52d.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@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We have not needed to end a TB for I/O since ba3e7926691 ("icount: clean up cpu_can_io at the entry to the block"), and gdbstub singlestep is handled by the generic function. Drop the unused 'n' argument to use_goto_tb. Cc: qemu-arm@nongnu.org Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 1a40e49db7..eb1907d049 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -386,35 +386,20 @@ static void gen_step_complete_exception(DisasContext *s) s->base.is_jmp = DISAS_NORETURN; } -static inline bool use_goto_tb(DisasContext *s, int n, uint64_t dest) +static inline bool use_goto_tb(DisasContext *s, uint64_t dest) { - /* No direct tb linking with singlestep (either QEMU's or the ARM - * debug architecture kind) or deterministic io - */ - if (s->base.singlestep_enabled || s->ss_active || - (tb_cflags(s->base.tb) & CF_LAST_IO)) { + if (s->ss_active) { return false; } - -#ifndef CONFIG_USER_ONLY - /* Only link tbs from inside the same guest page */ - if ((s->base.tb->pc & TARGET_PAGE_MASK) != (dest & TARGET_PAGE_MASK)) { - return false; - } -#endif - - return true; + return translator_use_goto_tb(&s->base, dest); } static inline void gen_goto_tb(DisasContext *s, int n, uint64_t dest) { - const TranslationBlock *tb; - - tb = s->base.tb; - if (use_goto_tb(s, n, dest)) { + if (use_goto_tb(s, dest)) { tcg_gen_goto_tb(n); gen_a64_set_pc_im(dest); - tcg_gen_exit_tb(tb, n); + tcg_gen_exit_tb(s->base.tb, n); s->base.is_jmp = DISAS_NORETURN; } else { gen_a64_set_pc_im(dest);