From patchwork Wed Jun 30 18:31:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468712 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp606726jao; Wed, 30 Jun 2021 11:32:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzo2VE+2Sve1mioy3EQuxB6Z5KV4SDqxDOACmybIBW+BiBHXAWhRVJnYijN0TPqpQIxdP5l X-Received: by 2002:a17:907:16a2:: with SMTP id hc34mr1553553ejc.351.1625077971983; Wed, 30 Jun 2021 11:32:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625077971; cv=none; d=google.com; s=arc-20160816; b=n+/XBOFM6t8UJawpnpHICGOTWYGQay0ryuivNCWDtrUiZ0QrMOpr5H1bpPFtc/4ljv XKuUQjj6R1SqEzdItvqQhll+1LkA9Uff8M/9HGl+9wqAFlFzxqbmrsHC0fONFWqq0mdS VRypRjy+u6lpv8VqBfBF9Rknv9Asv6IVpkjzisgctmpEXG/ENbLDNTF3/35mQLq+3Unq sychgfZZW/dP6rVCtAkMG2AcR6mT/phzPB5J8nntvkFcWnR8HckbGFf+BsAMkmf2S4Tu GlGtko40tzGXjQuuyhvUmc5xY5lGRtFIrrCKNWlD7oHAfjLyxQgUxfISGIkuDeR3Owcs Fqww== 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=CYAA0gCcixaZvejCGIEmqi8brwY1zVT0feeRzB35ZxQ=; b=elPmoL9w1dPMbS8M6by5z5oQ5p3q7bKWiDHAJmUNAM3cZaorDHKjdD8A8Helch4bWG IwvEx8A07s8SDXxi/meZ2UhVBRoZhfsjsfhC3aRkJW3mCYtbRrZ++SqylxUQgw1dndOq ko/PJQ2I/VrbtGy6hKS+a7NatMGNWBD45/OY27CpTpIDfOJuOkKEJ4F5+iJhCrvBfnaA lhhyvX2Dcqs3XBXD/BVhwfaczYwjO+RmZGziV52psl7EzwIswmAWkzoLkZcND2fHmGH7 nsUgYSYccjqIYjz1lD0K7JGzYfBzuL/bHbKPTMsgLLADPHVR9ggDtDtJgbrLDYTy/j5i flEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oti2FHeC; 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 q6si19658263edd.96.2021.06.30.11.32.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:32:51 -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=oti2FHeC; 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]:36526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyf10-00058F-TH for patch@linaro.org; Wed, 30 Jun 2021 14:32:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0j-00055S-JV for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:33 -0400 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:38586) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0g-0001xN-Ml for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:33 -0400 Received: by mail-pg1-x534.google.com with SMTP id h4so3185397pgp.5 for ; Wed, 30 Jun 2021 11:32:29 -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=CYAA0gCcixaZvejCGIEmqi8brwY1zVT0feeRzB35ZxQ=; b=oti2FHeChbI1wdzzHQpYrI5qRwC97GMusq3vx1fF+wKn3/9cNBzNADp8l9JErDQ8O1 7opXMsZRYEIV77sxm1NE/A0fm+G32LUzvC1UGZhwDV0QEHVQLkTHeyON3TCbx7zRJ75d lxOAp2SST30XuVGm3sqQnUwm4qRHnTy0uCg4JcmkahrgdzPGKarNq67W/KMp80/oQVn3 T4I4ytDBS2csvNQYORLHLQfO2xnQzFS1JmKjGZ1Vz3rl0fDinYyVZEIUHz9FdfAm+fql l72IECWa4tVXRy134jMqphdejHuP6atAED3QklzpmZDxf2rjrQm/X/Auy0NbcNPsIc3p cK6g== 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=CYAA0gCcixaZvejCGIEmqi8brwY1zVT0feeRzB35ZxQ=; b=drpEM36Xbqbd626B185L6KV+EQE30E82PWgCepaPIDD5CcpSa92kN1Y+vNyn2pOL9r i+9O3d+IX/T5gvs3UuTsm/tIOTPE5h6Jb92SHgFbpRB6W5O3OZBWa48vfXoFpPgQ+E1w PW2z2FkX46AM45baZ8hoZPb5yBGCUJK/ohm2X2SfIoDI8lUJiJDv6w1WVLOuVTyWkgmO dQf67ywXTSH8G9s+lf/ppEpRwj9gaOqvSegtB1IGE5T5Kcdj5GfKwP8jGKbsnWMhC+lG tOr/vTkFTWkV3eO8pn3mYnylOA/WCfisv6+QiP2O4Dcv9LJ0ke/KuBIXrE+8Wq81w2M/ lGSA== X-Gm-Message-State: AOAM530oqOQGBKea+fPbj5xfMS9GKMo+q2YsB/mZGsCQ+/JYSSve5Rna GSdmiUSzj+lqTm37vYp3+TK3c+qg3vbDig== X-Received: by 2002:a63:230c:: with SMTP id j12mr3607238pgj.382.1625077948664; Wed, 30 Jun 2021 11:32:28 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 01/28] accel/tcg: Introduce translator_use_goto_tb Date: Wed, 30 Jun 2021 11:31:59 -0700 Message-Id: <20210630183226.3290849-2-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::534; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x534.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: Max Filippov , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Add a generic version of the common use_goto_tb test. Various targets avoid the page crossing test for CONFIG_USER_ONLY, but that is wrong: mmap and mprotect can change page permissions. Reviewed-by: Max Filippov Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/exec/translator.h | 10 ++++++++++ accel/tcg/translator.c | 11 +++++++++++ 2 files changed, 21 insertions(+) -- 2.25.1 diff --git a/include/exec/translator.h b/include/exec/translator.h index 24232ead41..dd9c06d40d 100644 --- a/include/exec/translator.h +++ b/include/exec/translator.h @@ -145,6 +145,16 @@ void translator_loop(const TranslatorOps *ops, DisasContextBase *db, void translator_loop_temp_check(DisasContextBase *db); +/** + * translator_use_goto_tb + * @db: Disassembly context + * @dest: target pc of the goto + * + * Return true if goto_tb is allowed between the current TB + * and the destination PC. + */ +bool translator_use_goto_tb(DisasContextBase *db, target_ulong dest); + /* * Translator Load Functions * diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index 1d32732198..59804af37b 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -31,6 +31,17 @@ void translator_loop_temp_check(DisasContextBase *db) } } +bool translator_use_goto_tb(DisasContextBase *db, target_ulong dest) +{ + /* Suppress goto_tb in the case of single-steping. */ + if (db->singlestep_enabled || singlestep) { + return false; + } + + /* Check for the dest on the same page as the start of the TB. */ + return ((db->pc_first ^ dest) & TARGET_PAGE_MASK) == 0; +} + void translator_loop(const TranslatorOps *ops, DisasContextBase *db, CPUState *cpu, TranslationBlock *tb, int max_insns) { From patchwork Wed Jun 30 18:32:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468718 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp610590jao; Wed, 30 Jun 2021 11:37:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGIeYjgdKagpEhWArIn7VFTHPcEKq5CqmnVdSP/w0DG1QQTsSCYgUtW6kNp7MsCGz4T7Fp X-Received: by 2002:a9f:2f14:: with SMTP id x20mr22882459uaj.104.1625078275949; Wed, 30 Jun 2021 11:37:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625078275; cv=none; d=google.com; s=arc-20160816; b=JfEvGfvm9ZVVydTI3LcTBMSsZ/yIKoQOdQULlQ04DFiIy1CnMA9nSNqAbr/6AnvNBX XOAVtZi85QwvRIDshYzhDEpHopenfsaeRSjYEaAn86i3b1p3/+znm5LbVmGR22kDwUe5 4K7qaXnRQHFhF7vzEuuDHG2JhRMTp8nLV8rdC6PdvFQDBZoAUKoyreSW1XmjimedTO// mv/F4WlTbcySxdC5+bjVu9o1S3sHEDRma8noEl6MTyR0Mc2G61EmMjdGY7SySOTtIkeW ei0dGQbWSDKTt5lVz3Rc5hBAEyavyIFUq0o3vqrLGA312/mk2etWPuRMIKoamnpcfFaA nlfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=3aENiAfNt4e6plWtqF3mZo/s7tnSV/nuj/JuhYL6FAk=; b=fZw8IAkl/19UE5mpKxKOk5m3Puv3P8H+8VwozlOTOkgPtXTaNGy70n4o6gZ/7SyC/R foSDlkNlFja5wyVxRw0VqR2SCoqxemgNMW+2WqYpSbLp0Z6DwbR9xaCcz8vOXxKjqdg1 p5dSzF9o7m7MUiG+PO57G9kTP80PT3KniAdOSssRTcGoeYFfQQ6RkPBj1Uwbx8uHYgmR 3WKbhx8jHjYgjyunxPEBY7u5NpuU9IUndBCd3xaiK8fQSFhwGXPnKRdWtnzilIZmOciZ LNsgpQw1HjQIEdvr+kGNZzHdm5IHuV+bVj4h+MaXo71H9OnV61LMAJTWDjEjfPQOrZku j9jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ATtaXdMX; 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 y26si16047264vsj.142.2021.06.30.11.37.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:37:55 -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=ATtaXdMX; 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]:45160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyf5v-0002c2-Ar for patch@linaro.org; Wed, 30 Jun 2021 14:37:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0j-00055R-Ex for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:33 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]:44751) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0g-0001xy-FI for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:33 -0400 Received: by mail-pf1-x42c.google.com with SMTP id g21so3293517pfc.11 for ; Wed, 30 Jun 2021 11:32:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=3aENiAfNt4e6plWtqF3mZo/s7tnSV/nuj/JuhYL6FAk=; b=ATtaXdMXnhF5nQIO17QxLhyrN5NbccW8YtyBbOw/u2/7eJSP7qonNirtNNNltd2ChL iEIXR0exj9zSh638oocrajTwMEvQngr6BZ5ksdfcO/1wktm87Y2IiFq4yXCQFbNBcdPo P2cAdGGTWOraR9ifmssxIvWkpugFyhbAZpXKJzYXZlKQDgp8Cvorb5SP3+rrp7qRWEsh pPthfkjQJS4q++N9VUyfhZ7UJGU73W12xbc3vNJsClbpcxn1EC5p7OI3pbDNA3ZtWMoV uRx2qSFVJy7oVUG2usVVOozC534i4I/rudZu4ARE6lyVd1HYrs3WRDAiHhzcN7olYv26 sadg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3aENiAfNt4e6plWtqF3mZo/s7tnSV/nuj/JuhYL6FAk=; b=biaGbIdgWhxifB11pHkpCLtXCEGprkXIPrEwZ0LJ/5/svN/vuXxAMAwsuAeSovi6xY IiefAGRg+NUJBnNIG+pFWPT4tUirgWw2e17WZHi+xNdAbqsIp9LeQHUmM8kWXgvaoBgp d4tW1Xv9tuPtZCpVLLlQr29MIWJL0xVD0Z8LIkD1VflmiWF9ONwyfCpziC/7plVYTMx1 wFk8EZJadjmNoL7yBah8l2njP/HPs1ydXA4rXdiGPuBKTV0vnz+MkSsW6x4HJ2jYeWZk Y5+XVyRbAfrrt3V7R29XJDKgSV0VGAa1WpkJ3uOMEc3CethYX4sH/c2XTekgGxOgtElC 6DsA== X-Gm-Message-State: AOAM530mN14cAia3/DjW3HP4BTevXEqqbRgcod8fEJzSZq8enXk/il1c pP66tikxSdBo3Tinp1XyKr/+CY5CCxmnoA== X-Received: by 2002:a05:6a00:882:b029:30d:cd4e:79f with SMTP id q2-20020a056a000882b029030dcd4e079fmr12899320pfj.75.1625077949212; Wed, 30 Jun 2021 11:32:29 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:29 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 02/28] target/alpha: Remove use_exit_tb Date: Wed, 30 Jun 2021 11:32:00 -0700 Message-Id: <20210630183226.3290849-3-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::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.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: , 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"). We do not need to use exit_tb for singlestep, which only means generate one insn per TB. Which leaves only singlestep_enabled, which means raise a debug trap after every TB, which does not use exit_tb, which would leave the function mis-named. Signed-off-by: Richard Henderson --- target/alpha/translate.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/target/alpha/translate.c b/target/alpha/translate.c index f2922f5f8c..aaedf78116 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -450,19 +450,8 @@ static bool in_superpage(DisasContext *ctx, int64_t addr) #endif } -static bool use_exit_tb(DisasContext *ctx) -{ - return ((tb_cflags(ctx->base.tb) & CF_LAST_IO) - || ctx->base.singlestep_enabled - || singlestep); -} - static bool use_goto_tb(DisasContext *ctx, uint64_t dest) { - /* Suppress goto_tb in the case of single-steping and IO. */ - if (unlikely(use_exit_tb(ctx))) { - return false; - } #ifndef CONFIG_USER_ONLY /* If the destination is in the superpage, the page perms can't change. */ if (in_superpage(ctx, dest)) { @@ -1271,7 +1260,7 @@ static DisasJumpType gen_call_pal(DisasContext *ctx, int palcode) need the page permissions check. We'll see the existence of the page when we create the TB, and we'll flush all TBs if we change the PAL base register. */ - if (!use_exit_tb(ctx)) { + if (!ctx->base.singlestep_enabled) { tcg_gen_goto_tb(0); tcg_gen_movi_i64(cpu_pc, entry); tcg_gen_exit_tb(ctx->base.tb, 0); @@ -3095,7 +3084,7 @@ static void alpha_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu) tcg_gen_movi_i64(cpu_pc, ctx->base.pc_next); /* FALLTHRU */ case DISAS_PC_UPDATED: - if (!use_exit_tb(ctx)) { + if (!ctx->base.singlestep_enabled) { tcg_gen_lookup_and_goto_ptr(); break; } From patchwork Wed Jun 30 18:32:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468721 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp613321jao; Wed, 30 Jun 2021 11:41:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7+0yKRMI1MJ48wsn6WUMKNgElZkWyXHmUwTrJU90NO0EdCrbgW5SCfiJxWxZzsT7bRlZs X-Received: by 2002:a25:e0c9:: with SMTP id x192mr12432526ybg.213.1625078505165; Wed, 30 Jun 2021 11:41:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625078505; cv=none; d=google.com; s=arc-20160816; b=DWcThobHXYi8yvvi1BvtRJHhuIeT2DtEyh4JVfP+xwWaAf7A+kNl+dVKzBIpgCW4VA pE6IA3Nns+VZLS0OpEx7v+oNvBmgMLi6eFuLm0hT+vagam8bwfofdF6au4fSnXqBaMvJ W+8VCwQTuz6t6FmYVdSVGDHifJ468PVuniQcU3jtbUxxho85yqScTkr6Z/xNuHeAyoB5 PHBs/MpZ7Rkeq8n6W1zBjr/R5Gen9nmIv5IzmGjOmpIDwGcGF2e6GtnTzklNleavuQGR ftURW2DpYng4lj6EH5Abxwav6e6jToOtXZ2OM5z5SyuetaeFA5vG2ikgx39iNj55EO/y deTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=YzHaNSHTcPGqhF/jUvUjsx0pHeg/Xl1qSkbxFOtUk2A=; b=ZPkyUqrnIkj1FLjeyfh2J75Yum2UYHsQu1ZNHUDwNI9arVVoTt1YK14La9/lieitmk npRyDpF7zd/ry5lAiKLiUFcgHgrnOanqAZy8WfuwktFMBQyE30fsdJbkvJihNw1Fxlqe BJBjbXv6NgOTs91jF2+tu7rlMZ9QxUMIzvubf8vxMoJfVy+TVbz9YR/442iI2kK8vwVd nB3M98zgLkn48sqA3AV5Y2c2gnGux5ulCjy36jiZO/8DmX65sbV+EdC7ij3x8iP5Uih/ s+NwqsaiW7X3sOJvBrTfl6Lt0Ym+X3iGQrzIacRfEhlqcAiiRXnMZSmVziTfK9BsoH8h jIEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ad8vUANR; 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 g201si3791371ybf.468.2021.06.30.11.41.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:41:45 -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=ad8vUANR; 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]:53690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyf9c-0008It-Jo for patch@linaro.org; Wed, 30 Jun 2021 14:41:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45354) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0j-00055b-TZ for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:33 -0400 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]:44720) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0h-0001yf-57 for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:33 -0400 Received: by mail-pj1-x1029.google.com with SMTP id p4-20020a17090a9304b029016f3020d867so1982956pjo.3 for ; Wed, 30 Jun 2021 11:32:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=YzHaNSHTcPGqhF/jUvUjsx0pHeg/Xl1qSkbxFOtUk2A=; b=ad8vUANRHI33010LsIYZjmAxK34WCI+Jmbg2mhL17Cj5uSBBfQWHfqdRVUyZBGwQMG 5llcQnAruDaPaxGASnJfxDNoVecHYq0MdnM6vwwfIfF1EtkVlt40qVCmREV6mk/h17CP bgMH6OAAwowsVyfxJPuXkdzMJGwqwlSgFtNr46syU7XGf3iQ076eJkRS1gYAb0RaVuwm BlecgH9PFSOtwoxQftOOJPc17tl+Oe/W6YjpIPYxOX7asCi6OF8aFHWbOGq51USjh78Y 5O1btnIE3NCafIGmDSjQsLNdlDa/5nLdDe8FDBGGIdeggzHESbMCuCyE7/PWiiNrXzYj zZ/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YzHaNSHTcPGqhF/jUvUjsx0pHeg/Xl1qSkbxFOtUk2A=; b=ef6gSjWtfesRh6E84Fg1LoCpZSaRmi+Jx50ANceljf6ODOzNoEpCP0qCwgVMYAJfcd yFNNWehTe5W2+wdCWG4Vslnpc68PRohAZ2Z/bHAFvqf5R2o3SVv9lStg/wtHE1TlkQKU tc4yKdDPA7cxICLMlAFlKMWEG1rJ4U+x64lsigOoK4M6yqH72EX8sHx08cHaWTxW0Ms0 ZoC38ij3c9w0BkzHWeXxP7GaGP7MOnEGjnrWbBKRCHH6ngIiYSEAFOITY9gPZG5ND/ey BIAcxEpE/EfWbUw2UFzgo+sXcxE1qSfFXdE2F6VVUO/c4D+BUoHMvcV8Sa3JuJsgEKBt LeOw== X-Gm-Message-State: AOAM5334e5BfWzzoK7LzV6iZg/AqYdWAJyUKpglP/tAxGHgRYMuPJwUH b9wlNOr+MU1LUFKxpLDBqIoqN8AUirh5yw== X-Received: by 2002:a17:90a:c58d:: with SMTP id l13mr5719773pjt.186.1625077949883; Wed, 30 Jun 2021 11:32:29 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:29 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 03/28] target/alpha: Remove in_superpage Date: Wed, 30 Jun 2021 11:32:01 -0700 Message-Id: <20210630183226.3290849-4-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::1029; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1029.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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The number of links across (normal) pages using this is low, and it will shortly violate the contract for breakpoints. Signed-off-by: Richard Henderson --- target/alpha/translate.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/target/alpha/translate.c b/target/alpha/translate.c index aaedf78116..8fa00a79d1 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -439,24 +439,9 @@ static DisasJumpType gen_store_conditional(DisasContext *ctx, int ra, int rb, return DISAS_NEXT; } -static bool in_superpage(DisasContext *ctx, int64_t addr) -{ -#ifndef CONFIG_USER_ONLY - return ((ctx->tbflags & ENV_FLAG_PS_USER) == 0 - && addr >> TARGET_VIRT_ADDR_SPACE_BITS == -1 - && ((addr >> 41) & 3) == 2); -#else - return false; -#endif -} - static bool use_goto_tb(DisasContext *ctx, uint64_t dest) { #ifndef CONFIG_USER_ONLY - /* If the destination is in the superpage, the page perms can't change. */ - if (in_superpage(ctx, dest)) { - return true; - } /* Check for the dest on the same page as the start of the TB. */ return ((ctx->base.tb->pc ^ dest) & TARGET_PAGE_MASK) == 0; #else @@ -2991,7 +2976,7 @@ static void alpha_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cpu) { DisasContext *ctx = container_of(dcbase, DisasContext, base); CPUAlphaState *env = cpu->env_ptr; - int64_t bound, mask; + int64_t bound; ctx->tbflags = ctx->base.tb->flags; ctx->mem_idx = cpu_mmu_index(env, false); @@ -3020,12 +3005,7 @@ static void alpha_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cpu) ctx->lit = NULL; /* Bound the number of insns to execute to those left on the page. */ - if (in_superpage(ctx, ctx->base.pc_first)) { - mask = -1ULL << 41; - } else { - mask = TARGET_PAGE_MASK; - } - bound = -(ctx->base.pc_first | mask) / 4; + bound = -(ctx->base.pc_first | TARGET_PAGE_MASK) / 4; ctx->base.max_insns = MIN(ctx->base.max_insns, bound); } From patchwork Wed Jun 30 18:32:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468713 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp606756jao; Wed, 30 Jun 2021 11:32:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6vPmEHwbIC27w9x7mrqClNvIt5ILqnckMyu1uSOzpkHb1uRCEI0cYiYVrUIbkD2Rg5h8C X-Received: by 2002:a05:6402:4243:: with SMTP id g3mr31088891edb.118.1625077974345; Wed, 30 Jun 2021 11:32:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625077974; cv=none; d=google.com; s=arc-20160816; b=QGijrabvItJencFThFnWGkLg4vRkby7mSKRrGC6q+tpiv0a/2iTdNEkWBms0U/ClyA FIOLjdJCskdZ2TwiJdpp+3zpCGvHoecpUNIZsZ9vlgxUi04LKwF/DWwiKkS9OZtW72ix Z7JYjkS6C4Bd3KeiLG5CO0o3S7CxS2aRPtvB3rhZLQme3GsjFzX4Dljyyib7YTVxedBu O08YCBpXbladm7jf4efn+hmvraovgFrfqWisk/JIOopa+afNlEeP5S2msEhDNP+Vm4/D Ufxp7jv7J2olzQhlQQ4aCGlb4/xs4A3xxCA+aXsUMKrpQnklLLI1xMI7kEj/liUggLmF DNkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=dZt3Z++y99AGLIT8n4FaOlYOmeXV3kfGnWJ9nKg5oaU=; b=mnahjHkslgsEUEvTA/99ZPCp6OqySFc6c2KRe3xBbvdtnua1NhGPn2gyyfopjesTsI 4txbOFs0e3V4/tCSF5foow5EmyFilEs0xSKU3iaUaOzcO1kJ1lqcyCuSy40Lj6icWHxR QRXaJlN6+LhGqsmnDelw/IWOMPcI18voYEsKkzoyTiJ03A1dKzTNWN1yKIrPzbycD12o J7j2WO7zw8yFKsf1DXz0XsIq4j/mK0bnAgagg6AGznzYmgrXl3FqRB3UaDBNM5e2eDYN JeLNxHPzecL1YfaXVCbp3XBGg0vII6ex3fLKghUiO7VcaNSY28ztZgj2e9xPw/vDj+bQ FBGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JYk3+ZtR; 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 o20si20179695edv.332.2021.06.30.11.32.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:32:54 -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=JYk3+ZtR; 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]:36632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyf13-0005CF-AO for patch@linaro.org; Wed, 30 Jun 2021 14:32:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0m-00059F-0F for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:36 -0400 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]:51761) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0h-0001yi-J3 for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:35 -0400 Received: by mail-pj1-x102e.google.com with SMTP id n11so2386475pjo.1 for ; Wed, 30 Jun 2021 11:32:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=dZt3Z++y99AGLIT8n4FaOlYOmeXV3kfGnWJ9nKg5oaU=; b=JYk3+ZtR6XsxKQCbh/W8aBJ1epmQJmi9sO/7xeK8d2ouVZsM7svTwDJs+9sLXDHRS5 kg8Fs+y+UVYca8Mju6KEQCz+3ABSQAMVV8nEBprIohchh0fLFaDQokyQDgw4tM0trRwn Xxt4BRr3mkbpdVHC71V8xBBcvRpYvK6wBMbc0n49bI5Q0pQnBrhgTWC68lc7i1Ka+Rgi Zq2v/eDhtx/Fx95kQW/iQE/rVq3O5FomNSfCffutZp1BaxO/lY6+Hu5R68m+ZnQVtrQp rdsX5+GyicuRX5WUHSBfgWrKQMgxBtbGU04ZCUlMODKLzVU3N5WaiuSnfLNkq6tha2Se dmFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dZt3Z++y99AGLIT8n4FaOlYOmeXV3kfGnWJ9nKg5oaU=; b=Mxm0/a5gZKXkVDKerh3UjEQ8OVX9qrr5PngV6Pmdb8A1v9Yt2kBdWvRf1XqsfJMr4C JQnAXH/ULsAGKwl985azt1PS3Q/KWSNvLMnVSzU4Y3elZNfzKraeYinLS5LcZEjxIXud hJ37PTI+mRv7etWtkXlnAL04Eyr/KSS5C2hjMcXlHrVekiS/WtS07puz/hDq8tp7cqpz AxwZBxzpzoLaF2qU9XqUcHDHlcDEFrkbjfSV47/5UJjxfyiWNRn2oB7aenf89XBAOI8Y 6AOrhPiHS0t4QKknBlQi2+dTu2r7aDSP4LFFsx2daH/oTgTZAsF5ieVcOhwMn6xUFBOU D2/Q== X-Gm-Message-State: AOAM532hFKbJxmxdnJUEICjNagCh3on7zK1D8PKxCFvKASGq4do1KcIp x5ABrmBoNoewUpDNnI6zJ8p1BAsAh/C7Lg== X-Received: by 2002:a17:90b:30c2:: with SMTP id hi2mr5518631pjb.130.1625077950413; Wed, 30 Jun 2021 11:32:30 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:30 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 04/28] target/alpha: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:02 -0700 Message-Id: <20210630183226.3290849-5-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::102e; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102e.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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/alpha/translate.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 8fa00a79d1..de769f7633 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -441,12 +441,7 @@ static DisasJumpType gen_store_conditional(DisasContext *ctx, int ra, int rb, static bool use_goto_tb(DisasContext *ctx, uint64_t dest) { -#ifndef CONFIG_USER_ONLY - /* Check for the dest on the same page as the start of the TB. */ - return ((ctx->base.tb->pc ^ dest) & TARGET_PAGE_MASK) == 0; -#else - return true; -#endif + return translator_use_goto_tb(&ctx->base, dest); } static DisasJumpType gen_bdirect(DisasContext *ctx, int ra, int32_t disp) From patchwork Wed Jun 30 18:32:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468723 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp614947jao; Wed, 30 Jun 2021 11:44:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLNqhyEQM2TrrZSUlgJ4vVaz6lRGi1p2XZ0Qds1J05/nlsaPUCo6pnlKJ6PyojST2Yy95h X-Received: by 2002:a67:2c56:: with SMTP id s83mr5910992vss.22.1625078646673; Wed, 30 Jun 2021 11:44:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625078646; cv=none; d=google.com; s=arc-20160816; b=WPYsk/5V7+WrI127IaME1F6V/eoAQZwaVAaQVyv+42p54WVtGUbpCCSJephoAOx2tY 1y/gIPj9py/uvw2zyBxK737MdZcQE9eJBewKL4UM99k2wqtAWIHOX8VTxE+/OCX+bP9a 3Jww9lhQZqkYdwCGI/NRdmciV0AQ5G1AH9p1xoJoXThedNwRi7RZw37yY4Ap82rciHZb U6VhlxIDSHNWN7QHVEDRs77G72t4SUDZYAKT1nduTapV5wBiqF4OUaS1R9STwWKwFVdd VxeMYz3EMMJkPTxDYQWol8qJebk9vx2+/0SX1IkCS2Km+4Vnogu0DeclKjetMBF5pALZ IFfA== 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=dZ0tLrfANOVxMWpkjlBjlY0SUk5qXlMLl88Ghw1NubI=; b=QtcahzO19NLdE9oLh+FnfD/RFio+SVSlu8A0IDrnypDatFrd4Bk4BikMN7v2XznaqW CUzZYwN/sAVlxrb7lcmRRLupR/f5aWtDE6HI1SVzBFi0/6bNveOzjPZxmiYqfQ1k/vRF k8ZdLYTuw5gU2Bw6lomWG6zkvCNYq1z4xiH679JMv4KB+agGRufeCvftbOCxVZRjNiQk 1VeA5yhpKf+e/uyliFXLnQXB0csQX5m2CIujNjo4uaZ1jqi3pp+Vilow0Km27dNPQzRu 1opoSCffl1Fe/djwaUbg+lfyab8bW0ji2U25V6v3FazvAa+rzrU8C3HGfOehBKAbVOOF xaYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RwZsGG2Q; 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 o21si2448745uap.229.2021.06.30.11.44.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:44:06 -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=RwZsGG2Q; 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]:34202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfBu-0005p9-25 for patch@linaro.org; Wed, 30 Jun 2021 14:44:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0k-00055w-3e for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:34 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]:40455) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0i-0001yp-6y for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:33 -0400 Received: by mail-pf1-x42a.google.com with SMTP id j199so2860730pfd.7 for ; Wed, 30 Jun 2021 11:32:31 -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=dZ0tLrfANOVxMWpkjlBjlY0SUk5qXlMLl88Ghw1NubI=; b=RwZsGG2QOkBMwGuAF4pYiDvR00hb7nSQlTyO5J0n0/xrlu9I26UWxigbt00OV7pP8g NZYOWJEACf3gdSQxeQ48qT4o0uh0yCaK+WOY9EO9A7yNIwqtWQZ5g0G2HBxDqh+nNPx+ F98eg+fWFFCPGyL5fzwZk0kZFhSOl0YluRKi7eWHmOS6lMwdRQSsrqxjojLtxF1R2q5L nHxJtF5PAn3rd0ZVvVW+3VoqJRe86XqzekLa3XNsEPgfB5PJ23Vv7qjuduK8uAHET1yb sZWZH+NGoYCJFX/u+/kJ5opJp7A3qXx6pLdSuVBLJh5eV0SI4K4cGbGrWhGcGnpwH+f6 0yaw== 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=dZ0tLrfANOVxMWpkjlBjlY0SUk5qXlMLl88Ghw1NubI=; b=FgEHZYEc3ti408lZ2BoKW0xWoLUzFY9XM2VO/QYfARqGmL6D5yRcQ52xmAyvUKoDoP LieKY46Krlk4rcBzEq00gKLa5aQmeWYtGowVs0L9VxCK5oy3FGONrZEygdUPzHLs4FqK 4W3Y40bNj+W13hiDndCGiK2YUPQT5HSN9c5X9NjLl2sB9yo5elcrLb53eGg7BiLeVLw+ VPuDeopiu7k0C+yzru6WcUJNXlkmHF16nl249pH7OxOmms6bmGpTcnQW8ZcWnxagaZH/ y64uGmkaSD424WmtsUuwCKMES0dBIWTmyMksct43WrD5SVsKJ84+PebHuhrV24kZutX2 dTow== X-Gm-Message-State: AOAM532oFoi4TLdN26QLL9F8jYX1WlAmiduuc7acJzlSIuRyU7xssv6I N0jS8562Bcu4qYsLidBypXIKUiYfUovxXA== X-Received: by 2002:a62:3344:0:b029:24c:735c:4546 with SMTP id z65-20020a6233440000b029024c735c4546mr37827189pfz.1.1625077950953; Wed, 30 Jun 2021 11:32:30 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:30 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 05/28] target/arm: Use gen_jmp for ISB and SB Date: Wed, 30 Jun 2021 11:32:03 -0700 Message-Id: <20210630183226.3290849-6-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::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.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" 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(-) -- 2.25.1 Reviewed-by: Peter Maydell 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; } 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); From patchwork Wed Jun 30 18:32:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468725 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp616100jao; Wed, 30 Jun 2021 11:45:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsSS0mLteLWpEA4DrhdTM3PMkAxiOGHCo0l+azeaz1PpGEiVFyGV+wEcd4jvmej5ROnk2o X-Received: by 2002:ab0:2144:: with SMTP id t4mr35487616ual.75.1625078750177; Wed, 30 Jun 2021 11:45:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625078750; cv=none; d=google.com; s=arc-20160816; b=0oMy68eTeJ6VfQg+M1SntY6ciqyb/fLjTfwsKLPwfRcqTqzEOudZnkqpcQpqV8rMQ6 XR0U9IuAXorgdmjOqrq6IjYzzo0/cgis9rIYbD8MP/WttE3PIEhzJ/Aj3YfnWHGBwADY byaMUu2DaSYuoC1XPUUVNRpBdL14w5OTf2ZFaxucwPNRjMqrJ7zvHZHtosgYfhYbnBpM VC4NDvO3iMmU6Zs1AK7kbJzdZI0JGX9fGdl50fMoZ+0hgxNhRjo6yMcuDHLZc4cv75kc gj2P3EWH359FJBT3zyyhXCv0zxWM+hj29mFZb7/sIOk1q1tYK4FdCCFwu9kEyWM736DT PunQ== 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=A7hAexeBQ5Ar+tSUN9C4Tdw7ktlK4SgTVxbaVoJ2i0s=; b=AivCB6/qjJzs09gWS4wFINaqVhlqsphcuPHKC/rszxflyQayPGJwfAyR7X2prWBzOX BMjrBG35ckTq26ui0XtP3qFOjy97ZmOA4HH5ubzxEszsjHjlKLz7CAwGaaqAnw8GlZyy iouQcQxo76pe1Wx1BVC23UA/LcwoiZtHjLmNNjWec2qdQywPChQkcFx9ocMr+aPvTGTe fFS6q+05lRWbdiZzAJCCb3dYVUYDup/+YxR+Lo9qNx4kfCVkmA5USk1igeX7xrdgDli8 0GoyfXQZYpKyKYNEbn1xIhQWf1jyTCVL9uQAsZql7OkixGr3aL8tObk291MtuDJBJt2h u2ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ihCziMj/"; 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 k5si9654314uap.243.2021.06.30.11.45.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:45:50 -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="ihCziMj/"; 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]:35728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfDZ-0006oR-Hd for patch@linaro.org; Wed, 30 Jun 2021 14:45:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0r-0005Rm-UN for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:41 -0400 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:34677) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0j-00020K-Ge for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:41 -0400 Received: by mail-pj1-x102d.google.com with SMTP id g6-20020a17090adac6b029015d1a9a6f1aso4331155pjx.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=A7hAexeBQ5Ar+tSUN9C4Tdw7ktlK4SgTVxbaVoJ2i0s=; b=ihCziMj/HTV/Xl6uB6kQNq0V72HiCYO8CxkfPy453TKNlddisyHNuLIwOvXTVDgztH JYwznkd+mXm2SuWa3IBZSJN84BIKzIsCRNgskVb8IvYzkoUTI2O+aja5rj+GFmfN6j5W etHACZr+JOZBnprXC1w3Dy+Gj5x1pqPUTLT4tf7QuwHs5+GDXBWiMcISv6BOiJryMx42 zKb1vo+OelWK9tOuAMOxmuNndBB6YBsr3vEJkSFTgeRgLXgZu6fwVcjZdDDZrYBLXgfK PYUjdogpDSPHDAaZvu5A8Vz1inNRtAkBb9uozZ6AlGmf44zugTyB0WiJHEtGZ7D29I1p ByVA== 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=A7hAexeBQ5Ar+tSUN9C4Tdw7ktlK4SgTVxbaVoJ2i0s=; b=JAPi+JPiEdOeeB1kGAkYYJ0zYanxiJa5I6x1s8DJ70Xd2BvVz9gEX//+OqOKg5pYl6 05mG0Rxje7pLfCdcfED41X0sRRq3csh/cup8Pdh/8xy2bPDZj/QMPQ5/RhHxn3lirIEV NzW9HD8jWjbRKeyoDdKxMehyZwQLEUwOIpL9VGofVNr/aIvj0NpvrTxxV/wAMYafmJQp ZONAcyY37PJMNXwplN3G9EjP7y4hDqLlfiXMZnv7PyBbrAE8I+HtbK6xIQyyh4VGTu2i GdmqhPCd3VQIbUtqD/n2Bt9K8te7khtLijpzkph0fNl+PP6Gn8jH7w9x+NEfeuy2uou1 04Nw== X-Gm-Message-State: AOAM532iCaLGAjHj9cQ9NTPcMYB79vgKY/10ap4b5hpMcWxBPtrkuOca FJCzFRn7cnvNJl7i/Q8o8rAkwwXAQuyD4w== X-Received: by 2002:a17:90b:3697:: with SMTP id mj23mr5658760pjb.118.1625077952128; Wed, 30 Jun 2021 11:32:32 -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 07/28] target/arm: Use translator_use_goto_tb for aarch32 Date: Wed, 30 Jun 2021 11:32:05 -0700 Message-Id: <20210630183226.3290849-8-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::102d; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102d.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=unavailable 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" Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Cc: qemu-arm@nongnu.org Signed-off-by: Richard Henderson --- target/arm/translate.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/target/arm/translate.c b/target/arm/translate.c index 8cd31feeaa..87c3c09df5 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -2509,16 +2509,6 @@ static int disas_dsp_insn(DisasContext *s, uint32_t insn) return 1; } -static inline bool use_goto_tb(DisasContext *s, target_ulong dest) -{ -#ifndef CONFIG_USER_ONLY - return (s->base.tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK) || - ((s->base.pc_next - 1) & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK); -#else - return true; -#endif -} - static void gen_goto_ptr(void) { tcg_gen_lookup_and_goto_ptr(); @@ -2530,7 +2520,7 @@ static void gen_goto_ptr(void) */ static void gen_goto_tb(DisasContext *s, int n, target_ulong dest) { - if (use_goto_tb(s, dest)) { + if (translator_use_goto_tb(&s->base, dest)) { tcg_gen_goto_tb(n); gen_set_pc_im(s, dest); tcg_gen_exit_tb(s->base.tb, n); From patchwork Wed Jun 30 18:32:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468714 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp607886jao; Wed, 30 Jun 2021 11:34:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJi6m4JDhg36bN+fp+kWqBGOIw26fm8pMyn5pdVX97jrr/8RBsqlE5+LvuogjPX4OcBq6K X-Received: by 2002:a5b:50e:: with SMTP id o14mr46236275ybp.43.1625078053359; Wed, 30 Jun 2021 11:34:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625078053; cv=none; d=google.com; s=arc-20160816; b=qLj4wK76DCanWddWDTXAxd6vAfjjpwLSyfRoHrWIpFlB8pheNOLUlWmsa2weFiHsid WmrBsOXc9k6EDJC1raLdcEJ1X44wONAhVTf1M+e3C4pPAeVM7NciE0fy9DZIZrTwzFVY OktLbLZPyXyn1LbRUVCHXi7TNrGrn29wwHsPzOHdJPdiNzpo3T/nDijTYEBO00ICeJj4 BTUXHDIxnc7XhFqqkIhsMdrKGxk6DAzj9YtO1+5AkaatwuZNm3HW6FE3Lt+ymo0WiR63 XridwEHzbITYl0WvqnO387l2EoQgtej2MxpAgh+Z1Siz10aZ8u9aqDNBgI/E6s+uA9T+ tNew== 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=8W3E8oUQSB677QQyABV7B4p2F0hPm4epmS7TTIJ96Bk=; b=k+GPTsDu8NdBAy/kqmmWmd98OXf24UfGig9GaF36Yer/+m4lfKhy5VG5KyShV45upW tXqgx6dHvOzxBNiWZVLxEKAcF4ollUGIRoMh8AET9fxUJjRDoCdFa2r0aQjOKO5o8Ath Ipo2LyvHYvT5Ft+W6qeNZNPtia1tiJsmqyRJw46vqTduK9ZtT7WmRWzeFEduh5aDrYVa U3mzI+Jz9FUZl0XeGmTQZcrt+BfTz5J1eRyXaIGHa27L7aipBwQVg9JNoc+WuiyfsEGC iSWbU5tyNQ3pitPTBF+KHED6QGf3QVjp0bc/Xnsd44XSTaZbekbHGUsDQ71VHhk1d54T rm9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SlOIausg; 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 k82si8620669ybf.21.2021.06.30.11.34.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:34:13 -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=SlOIausg; 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]:36946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyf2K-0005P0-Q9 for patch@linaro.org; Wed, 30 Jun 2021 14:34:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45466) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0n-0005Bv-QC for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:37 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:34372) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0j-00020j-Sn for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:37 -0400 Received: by mail-pf1-x42b.google.com with SMTP id i6so3343071pfq.1 for ; Wed, 30 Jun 2021 11:32:33 -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=8W3E8oUQSB677QQyABV7B4p2F0hPm4epmS7TTIJ96Bk=; b=SlOIausg4Hz3hJmCWvLEkzRhqbskKyU7TpFEFXCuLEtxGbF90YnW306n14zNBG2GM0 tT1EBK9KsRvRZZtvIv01L6ZBLVW4o10OdTfSxAaCCcCKIVimWqcPHC7XQThhtBI+LzO3 g3g4s2bKn7vAEG1yr4UKcy/7Lzol+9HZd7E4hLfuw+RzJy9Mhfcshxv9Urp0ThsA4guR CAJZqVmTblshVILHQfPhzdFQP0fRNQTCTjE3tzpKcWvyQBaMMzf7C7D9vZkGmgpboMvu IJ/S8a80UpMxUNsIbAAGPdxSeywR1mPBdlFtbsxL36OyB0Mgk8oGENBK+IaJOujwBvN8 XPcw== 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=8W3E8oUQSB677QQyABV7B4p2F0hPm4epmS7TTIJ96Bk=; b=jmjf6pL89Gll81Z7pogI/+e//JXIwUpn6ZFWVMmbxhc6GIGW8H0pzxBOxJNaVX4dn1 zko3qNis0VGYMhR9fitSt1+G59h0Y5Qz+ElNCNidhZktHq4q+8WzgiUAFmHsxQf/4A+4 zvfo6KEpGMO1DOorT2U5d5JWMhfQ3RCTSz4Ooo6zhFfZVPKYXILY55BEFScb30w4RUWO j61JngiBMk6gWGVtMbOEj2N+BghFpxt6RGSGr/U6Re9PjohstPFTFqzHOL9I7OfXL1bC dnA419OiCEX0Ldn50aFxoVGmmhZJFJNbLXEhuAWNHWc2q60Z18GHiXKEX/+m7vJtDNg8 vXPw== X-Gm-Message-State: AOAM531oBjeHMGIgWVGXAxXhaiOFsbml8X/mkhuTuZSLcgc7BWhnhDXa zIqDWVSHGj113SLJMUzOE5gXcTDSvR0Ihw== X-Received: by 2002:a62:1d84:0:b029:304:5af1:65f6 with SMTP id d126-20020a621d840000b02903045af165f6mr35035355pfd.80.1625077952590; Wed, 30 Jun 2021 11:32:32 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:32 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 08/28] target/avr: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:06 -0700 Message-Id: <20210630183226.3290849-9-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::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42b.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: Michael Rolnik Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Single stepping is not the only reason not to use goto_tb. If goto_tb is disallowed, and single-stepping is not enabled, then use tcg_gen_lookup_and_goto_tb to indirectly chain. Cc: Michael Rolnik Signed-off-by: Richard Henderson --- target/avr/translate.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/target/avr/translate.c b/target/avr/translate.c index c06ce45bc7..8237a03c23 100644 --- a/target/avr/translate.c +++ b/target/avr/translate.c @@ -1083,14 +1083,17 @@ static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) { const TranslationBlock *tb = ctx->base.tb; - if (!ctx->base.singlestep_enabled) { + if (translator_use_goto_tb(&ctx->base, dest)) { tcg_gen_goto_tb(n); tcg_gen_movi_i32(cpu_pc, dest); tcg_gen_exit_tb(tb, n); } else { tcg_gen_movi_i32(cpu_pc, dest); - gen_helper_debug(cpu_env); - tcg_gen_exit_tb(NULL, 0); + if (ctx->base.singlestep_enabled) { + gen_helper_debug(cpu_env); + } else { + tcg_gen_lookup_and_goto_ptr(); + } } ctx->base.is_jmp = DISAS_NORETURN; } From patchwork Wed Jun 30 18:32:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468716 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp610248jao; Wed, 30 Jun 2021 11:37:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbxEnpTb07ql8nkGth0cYJ7CRopAsJ+p7kDN6U52d57YXncYKizXMPRCxR/qDTmlurc6lH X-Received: by 2002:a25:9886:: with SMTP id l6mr46692106ybo.233.1625078246345; Wed, 30 Jun 2021 11:37:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625078246; cv=none; d=google.com; s=arc-20160816; b=Tp0cbWxuXrfaC4MnFafmTYAWwsmKfKMJ4Ng9uDArJucpeF6mouQdhdbd6zYe2hm3Qz MS3y8aWPcyOzi9K7YN+zUVuh43qSXKQLQTPoe2Ns5v0CE3nDPsGe8EZBpTf+tcwNcXpu lzTQKZn3SYlymq0SG2R27Q3HTJka6yWRnp9zaI8RWruJWLybFic2kA7N5ckPj2qN0gnO NiQJjH8jg7mx5tf4iPzeByb+ec2l6v4tzGKs8RVbkTt3OxQ1q+8MI68O9OSzPaLGhHFH VZBh4Ue+Emn9rnqw4KWZXEIXfhTMLhYN3OkLde7k5lEKhPtRyDpz8FYobPYMHiAVfvpw kPgg== 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=J78iIrV/uBjFzK3bTpbLy3S7PgpqgxUhkktjGy5U398=; b=QrLpaY2F4Kht+yYenqCP/ZFZ4y3GZXkhQmqUGJLxlqJTAWgxzb2cbML87iTLdhh/Wj FiTYli58gGW89t2a78HGovtCXuO5wiOsgNlZywHGGfiqzSubWxHbjpxVWxvgcCgopiv1 RojpXNdXfRO64eD3Q7jPxNo0Wzkz3Mbv3CG9cJiN2CWm+KOhFHzADRrREucH0vxAKTbX W7pB919xbk0T4Gjpo26wni9CSzTxXtyHQnvMJk/MSR23QxzVPe8rnPeh6oXIti911nkJ oFrbCzcjVrunyvYaFDbK7N6QSzhEY/cE59tgNycHcCFMWZSa8CW1v4tJH6BlpM5n5Py6 eB+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GpcDQhn3; 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 y6si7311025ybh.53.2021.06.30.11.37.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:37:26 -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=GpcDQhn3; 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]:46050 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyf5R-0003BV-RP for patch@linaro.org; Wed, 30 Jun 2021 14:37:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45448) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0n-0005AT-5K for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:37 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:37394) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0k-00021E-9e for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:36 -0400 Received: by mail-pf1-x42f.google.com with SMTP id 17so3087656pfz.4 for ; Wed, 30 Jun 2021 11:32:33 -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=J78iIrV/uBjFzK3bTpbLy3S7PgpqgxUhkktjGy5U398=; b=GpcDQhn3rNZq22ejfC51ec1IHUChdfMXgZltxnQz6aid6/QPCGIpK2IECmRwcRB4u9 leXOYx460tvMC18EoKJad3WJKsIgVbH27GdBfH1HyfzXeWeTMYkoR9KA0unx7WTj8y5w xRMFGlyCEn5n9FqBttq5MD6dNBXr0CDaQnRpAGofCZedIkOI0ihvb5oKx5BO0YkGi93M 6J6/93aC12nGEgIeFEQHZgrqJUyps1E5zv3iBnquNkbiv6otXhu4m/5n5309KE+gjwnH JAhCPjprCziSUjxMV1cNlYSWcx7gmCpwlecQl5lWA9PCSaZm3Ed2/WnUxlV3tZQCIqcs CE8w== 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=J78iIrV/uBjFzK3bTpbLy3S7PgpqgxUhkktjGy5U398=; b=kMuOqDrJMplov1zd6MUNljjMK1ahONjpnDhxP8twaf9z+eyNb1Tkh8GwzRGajmdMbH m1lXEJ9VkFmYcxTNaO3JcBoUztHq86U8q0gzwK+vLT9iKM0LxU5G0+/+X8NwEdLZnN80 00x0vdOzLh5LLSsVDAYSpuY3tYjkAR8AKv/RWPq/7F+VPv6hx/y2LbG2IPkVTdmBi8p/ eRRDs0UhR4WQSdLFYdrHaT3NeNt9qU+FUnohVCYaWRXTnhcKtEBNHS7mcfqbvRAVWQOd /3Ardqd93XGFsX5CXL9JqD2vN4+qTfjj7U+BGFzbGBddznMVbPR+UeifTuNsHjSRVThg y90w== X-Gm-Message-State: AOAM530oXhc4Ng3DdV4E22ka9uDRaRhiZDlP+BJbZZCgJKiDb06BvQX0 bEguZbqGTzSy5f/FtSZoFpYGpKOgIkWc1g== X-Received: by 2002:aa7:8591:0:b029:302:e6e8:705 with SMTP id w17-20020aa785910000b0290302e6e80705mr3613749pfn.5.1625077953046; 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.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:32 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 09/28] target/avr: Mark some helpers noreturn Date: Wed, 30 Jun 2021 11:32:07 -0700 Message-Id: <20210630183226.3290849-10-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::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42f.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: Michael Rolnik , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" All of these helpers end with cpu_loop_exit. Reviewed-by: Michael Rolnik Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/avr/helper.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.25.1 diff --git a/target/avr/helper.h b/target/avr/helper.h index 8e1ae7fda0..4d02e648fa 100644 --- a/target/avr/helper.h +++ b/target/avr/helper.h @@ -19,10 +19,10 @@ */ DEF_HELPER_1(wdr, void, env) -DEF_HELPER_1(debug, void, env) -DEF_HELPER_1(break, void, env) -DEF_HELPER_1(sleep, void, env) -DEF_HELPER_1(unsupported, void, env) +DEF_HELPER_1(debug, noreturn, env) +DEF_HELPER_1(break, noreturn, env) +DEF_HELPER_1(sleep, noreturn, env) +DEF_HELPER_1(unsupported, noreturn, env) DEF_HELPER_3(outb, void, env, i32, i32) DEF_HELPER_2(inb, tl, env, i32) DEF_HELPER_3(fullwr, void, env, i32, i32) 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(); From patchwork Wed Jun 30 18:32:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468717 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp610447jao; Wed, 30 Jun 2021 11:37:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzcivL94U7EWHl7NrUeJPhmHxlLFkffwfwYqoKIJaw7AD2g6dnx7Pitd3JxuuSR2G39Qt4 X-Received: by 2002:a25:1546:: with SMTP id 67mr16293558ybv.331.1625078262585; Wed, 30 Jun 2021 11:37:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625078262; cv=none; d=google.com; s=arc-20160816; b=DWsO+6O6pc1xM7FRZ+UNvXCN8iJfkx9nR7ZSWNR77gfKBwwj/9ooCHIMLj42PUodYg cQJXg9mjqVm3m3PGUxMjjz23wmc2ogpCS89N8Bd1awA40Zufg8+MdsUoYgTh3GGaj6uP qOOuiOKqZLalABDJcGfQd0+Gb40g//A+ZM0Z/r7OW4nhc7QZ3BeK7hiwPucTgg7hQAk7 /01jPQySC4kFN0cz9l8aY3hggpVDhxkPPFZpruHsKFK7WSJpvl0Hw5bgBbpsmNGdNFwd WHcxO8SrVrYEfMKQ2hhKJ2ddhgCueWozRUUU6+GgwaJdduZkQuuY2OGs5fycI3hV0pkP 8xTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=cH+sdopDqg3AA/XmKjvzj97BFIKh2FfG1/i/yI9Y2V4=; b=LrZ7Sj1ifDwNIG3Da8icHI/TPPiScm55qnJ4y0mJVh3UcV2i6Ixj3/dwCvfdU1HMdb XLXsKpfvwLTm81qxzt6dqipay1Q3zpsS2fR1n8L+d4XIt5a/Ir3rLb4crwlf0jT09Tnl 7cFoMuAar5QuxK0IqBfm7M5ZF5H4QBNO4r2q13eEWe9QX1kUsk46gPvcgD8PZHdW45UL BtAWG8LF6/fLKRdmaAYy3fqV6vt1x9cRInQd2kG3PfDehEY1rguZB59Tn5CbZFKGrvhu x7r6gvGOdc0JT7jCpr2C8H0/KOpAOgt8HkS83KQtTVgSVsympJT2Rry6binYPOpe/iuU bYHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nZWpNRvm; 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 d22si12090941ybe.78.2021.06.30.11.37.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:37:42 -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=nZWpNRvm; 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]:46882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyf5i-0003kP-31 for patch@linaro.org; Wed, 30 Jun 2021 14:37:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0o-0005EN-K0 for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:38 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:37397) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0l-00021f-7k for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:38 -0400 Received: by mail-pf1-x432.google.com with SMTP id 17so3087680pfz.4 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:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=cH+sdopDqg3AA/XmKjvzj97BFIKh2FfG1/i/yI9Y2V4=; b=nZWpNRvmJr8B0KLGBlmol8zFkgwK9OeS5n1S8HpnfR8XZtneZQMeYlm1xQVmWhTSDX nn78T4xFepqoJfUdbrxjRgL1Lgy9Xi8iR+dIkqeErBZpTetY8jwTG/qWfakhxadbVqUA gbkLNbHMpG83++qabE6HHlcfT2K84ryb+563YjwHRDhMtvpXV47GpdWcBW73Xo17JfZI ziZT1KOWn+eQBf8LxccUQ68S6rLFX7YD9hysqtjVR4FJvuU0udwtjdNMAkj/LvPKYH43 J5nnFcfXnZ5HFbyvZDuNKBqMCS6CLSC/HXT3j4AFkSmHFICgiIiay9lugaDnkfrgiDp1 KcAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cH+sdopDqg3AA/XmKjvzj97BFIKh2FfG1/i/yI9Y2V4=; b=bGlliZcukAPFCbyL54c+qot7JN1/dmgefhH7lIN5KXa8racDF7K01898uIKNIY+rm6 xQnuzagvodEGgPPsi/gMm6DSDpVjLdtHUN8FJSwaVGFZNytGZtfmpyZLg6AKLcaU7zPm b6yC58kTsJDDLFnlEfXD854kMlmJYOTOlE4THbSvA3VOyM1omFLDZorAqitYqGlAVqnr NbhfBPthtULdWxd1GvWAwaaJmhcrToFFxEngxltUFcpCH/DVwhbC2QZA1dJ52/Not5bN KZk9P9oPPFXJK42DggdHgYIXAQOpvC+cXir8rXpaDle4ilyTzQoc12LfghbSsM7zzQcV myCg== X-Gm-Message-State: AOAM533LgJ5elUDKkbgbs9YphM+gSwh62mbzSTiqDa8GDvjlSUBYsYuw r90Tg2vhrbVW8mZdBka4OXVyQDMUbqz/Kw== X-Received: by 2002:a65:5889:: with SMTP id d9mr395398pgu.410.1625077954111; Wed, 30 Jun 2021 11:32:34 -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 for (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 11/28] target/hppa: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:09 -0700 Message-Id: <20210630183226.3290849-12-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::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x432.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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/hppa/translate.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 64af1e0d5c..952cfe09a6 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -817,10 +817,7 @@ static bool gen_illegal(DisasContext *ctx) static bool use_goto_tb(DisasContext *ctx, target_ureg dest) { - /* Suppress goto_tb for page crossing, IO, or single-steping. */ - return !(((ctx->base.pc_first ^ dest) & TARGET_PAGE_MASK) - || (tb_cflags(ctx->base.tb) & CF_LAST_IO) - || ctx->base.singlestep_enabled); + return translator_use_goto_tb(&ctx->base, dest); } /* If the next insn is to be nullified, and it's on the same page, From patchwork Wed Jun 30 18:32:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468715 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp609918jao; Wed, 30 Jun 2021 11:37:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDOVxiBFdgbc+9BnyHbriw/Kzzrnt1y4VVo/KIKJgcMYTY5jy7iTKQsVnA62kC+YTyT6y7 X-Received: by 2002:a25:2bc1:: with SMTP id r184mr49993134ybr.51.1625078219935; Wed, 30 Jun 2021 11:36:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625078219; cv=none; d=google.com; s=arc-20160816; b=vXBQVJ5Fwnu8r28G7wM19SHJLCoTV229PkP8/rDoDA4wZ3b4HS7vkI4lE8ZpiqkcXD MTgFEER/zUWWvXVxoVMOn8g2NUo2IVeiAAaTFg5M4mWkxKQ3kBPscw1dL4uQKDMRQ0/1 esuXMPihUexpeO0ojRBfri2u+ER/V/464HE17ETG9qV6ZoPOVd10tVFF7xPKXy3lCInS 6+19o/TrG11i0QCVZbPKVjfb4rf+pGVuo/oJJEnFXTEOPvrAMXFddeX9HCrBnc1fDClV 9+hIcJUr1P3p3SlgukZq37vwGGzeqOZ/OH0adiLr368XksWmhBK0FdhPlwgBbas2UBXk /erw== 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=pZJo4XGYgbkEYhOyx8VRv2KPcpMmqSnPo9gCdL2MX1E=; b=IgY7TE0TVGDjuyp1mIkrDE4eZHFwutrQgevwCWUNKHjKYJAHmx5mzSAix4g18qbVE5 X+C2tSQq6Xr0fwfamJAjP5Yy6VAgO0/bfkyqB1c1DEwPeXnMqQHILqYeAxJlRDV4u0yb o71EkIqH93KXo/FS+1IyzTJs2tAGq3KoI1WdEGvVgpQ59QVh3HMHIld/Kg/2uhlCc5+A bmCsPr2/UaBDnJSPzgYdAHsqiPS0yJ2fadSGqEcjDAki9QkhlyEabMKJgtlt7zdpiwbD bxMLOmBO1vpzgXG4kghuxkia2coJXpwE7fBV+cjZC5O0oULKwa8azuqptV07Sfz4sdn0 bdjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YezUgflh; 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 m84si17175747ybb.438.2021.06.30.11.36.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:36:59 -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=YezUgflh; 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]:45328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyf4y-0002iS-5Y for patch@linaro.org; Wed, 30 Jun 2021 14:36:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45556) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0q-0005NZ-SK for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:40 -0400 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]:35451) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0m-00021v-1V for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:40 -0400 Received: by mail-pg1-x52d.google.com with SMTP id v7so3207713pgl.2 for ; Wed, 30 Jun 2021 11:32:35 -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=pZJo4XGYgbkEYhOyx8VRv2KPcpMmqSnPo9gCdL2MX1E=; b=YezUgflhWFt0Qe4stCT2eaMShNkYH7l1CHtm16KxDiXgO3YzbIPVVxzoeOD3CtanzO eaw4UuGL4u5d1Gec1+YjRBRcjoov9SUl7IQN4QKiLiVdjBRiK9+TG033GrvcZ9N1ipB7 8PeSVbwDU2zRg7z581oYPFmojor00jDmsr55oIIFTZJXfEd7CKnwWNHmhlRE6Bp4r3b6 52DzD9aWGXBUgYM5tBAoHqMg5u0aVfxg3fLqnpqhH4YxmD722Qz4dNIa9KLcK3emmKN8 daQfhGWfeLJz5Yn6dGcAccDIsfaqUGsTbBvj303ilCxhoo2vhrL+LFIExq8HguEUJD5x 1p5Q== 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=pZJo4XGYgbkEYhOyx8VRv2KPcpMmqSnPo9gCdL2MX1E=; b=cd8m3dAuTmLM1FbpJwa4JpK2t5GXVkrl8XkHFBSd+urokw1pZ9a4EuOJ+fSC18dkkD pQ/AERH4aA7UlbH+jS8P1jOTuMjI4Jih5PGu7pfciM0HudoUfas+kF+n88c5N1cllaBu 7ms3x3QsExJgO6ZejjarBetSeK4I5q+WpAWj7uHkxn7+bFC2Aq2q8uMTThd/l+N22iHV pMmWrnu0TUviKiNeJJ5h1g4kOIxJEGp+MjLSujf8MkGqP0BjB8raKy05l7CqtldxHSvc 4Oi25Ai2O95F/cZuI4VcaIevLEkL/GIgjSctSPJq9RBDE9z0Eo6HtOVX4Ns9CMrXfjQV h2NA== X-Gm-Message-State: AOAM533+bF8tZM7a1DT1V8BgTJkLV9fK3ebLSnNtZVxuv6KEMkdHIHuB P/Li4ciNPaAW2waCj5VUV5HxPI7rM0139w== X-Received: by 2002:aa7:99ce:0:b029:30f:7bf3:594a with SMTP id v14-20020aa799ce0000b029030f7bf3594amr6020906pfi.34.1625077954842; Wed, 30 Jun 2021 11:32:34 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:34 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 12/28] target/i386: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:10 -0700 Message-Id: <20210630183226.3290849-13-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: Paolo Bonzini , Eduardo Habkost Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Cc: Paolo Bonzini Cc: Eduardo Habkost Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index b21873ed23..eb9ee0296f 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -2314,21 +2314,11 @@ static inline int insn_const_size(MemOp ot) } } -static inline bool use_goto_tb(DisasContext *s, target_ulong pc) -{ -#ifndef CONFIG_USER_ONLY - return (pc & TARGET_PAGE_MASK) == (s->base.tb->pc & TARGET_PAGE_MASK) || - (pc & TARGET_PAGE_MASK) == (s->pc_start & TARGET_PAGE_MASK); -#else - return true; -#endif -} - -static inline void gen_goto_tb(DisasContext *s, int tb_num, target_ulong eip) +static void gen_goto_tb(DisasContext *s, int tb_num, target_ulong eip) { target_ulong pc = s->cs_base + eip; - if (use_goto_tb(s, pc)) { + if (translator_use_goto_tb(&s->base, pc)) { /* jump to same page: we can use a direct jump */ tcg_gen_goto_tb(tb_num); gen_jmp_im(s, eip); From patchwork Wed Jun 30 18:32:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468720 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp612942jao; Wed, 30 Jun 2021 11:41:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOl8O5QFkPtYMkdTLMx8u4IBf9PU3TnAsA/rvcnHPyRNERmD3kA3a2mHzVL2pJbx7dwNT6 X-Received: by 2002:a25:bd84:: with SMTP id f4mr51058807ybh.143.1625078475427; Wed, 30 Jun 2021 11:41:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625078475; cv=none; d=google.com; s=arc-20160816; b=Ae7lnKym/FR0nFSetYYHloQXQNGDbcdRgp84OfDrSN8EuVEkjXENDUdlKMLMGqSncf FNuKRS+TRz+c8j/Tr2Fqd3pQRgP5COoKSOHpV4FaZ9SkK+2YtiMjpIkY41XWzXRoJe9A QHP+mJNhPnsopjgE/xvyue5QgPgxlQsxXI+ugBEQdN9xgPqcqzP3i6mlkgjNXM7Jxc/P Cm3puw7htq3Mtje3d+UfOrasA0KXOkgG8UbCCBDM7QwiyQAZbBy6obEfpg+P7IzHt0hy FUYCyHINcNd9PkbkL5xhxRMZzj6KzTO/bSONuDy1mjJzdGH8IqdwnqU/TthaSxTTDW0Z yPxA== 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=+Jf1hfNBd506pP5UotsDrbYdrcf9l5zM5YtUqqOrZ/M=; b=IsFm1K861D6rr6htWL391O6kxr0MznQh0Vrfomz0cPiWBvT++9PLgmlpmaqeYzHnjl 3JDgVAhkwQxG6fs8/5Mad6yGA2v3494Vu8XYnGMZNszFtLf3tXwlc3eRTZ0w+CkqBnmz ToxJ5RaENjvPX3tE0lFOsz0NTvTFqxUVnsc6YxK8vRqTPb/e97K7hWopsRy3iylvy1KI UEs4IpvxujTiluiaqiNpRtHP2Fs7IQBbN644p+DouiWjyWtNHiXfBJbC1fUUYFHNoLFV IicbUpZpsgDTgM8O+yZIC4dnrbNI50/Ck1gcxI9vz42SYdC/Fr2yx8gCxCSHtcQ3Ie4O vINQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U59gzQAH; 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 e2si20641448ybn.363.2021.06.30.11.41.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:41:15 -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=U59gzQAH; 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]:55458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyf98-00018l-TU for patch@linaro.org; Wed, 30 Jun 2021 14:41:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0p-0005GY-4j for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:39 -0400 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:37715) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0m-00022Q-Sw for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:38 -0400 Received: by mail-pg1-x529.google.com with SMTP id t9so3196981pgn.4 for ; Wed, 30 Jun 2021 11:32:36 -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=+Jf1hfNBd506pP5UotsDrbYdrcf9l5zM5YtUqqOrZ/M=; b=U59gzQAHTzh+//CyTQHvff5KXBoJ9wsWtQhtp8j4riQi/H1ZfbP50QZJyRjX+h2JJD +fKddZU0NtYQ+WfCoasWpDXDdutZKwaYBN5PaJvO5i2Rk3F1xgvKcgBMzJkp/ieo68R8 AuwXOeh/eKUm0ir8s271DZLIbJSIEgAvl89kgJ1NwB1PV598Ez61ZdwyKR8AZd9M3VYJ 2O5BlPQ94tbXm1qbldZIcxF2MbpfaOeloX7DGvsMszzEURhs9c4AH7ZuBCNJngAr1HBz VEuYOc3ClbrEzhtuqGF1Tb08p++cRF1L0W1+aXZEvSDck/3+IIV7k7/azfD+r8DYkpJi lu/w== 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=+Jf1hfNBd506pP5UotsDrbYdrcf9l5zM5YtUqqOrZ/M=; b=sZZXaO551wi+cWW57gIECktDUF4yiiV+QVYGUTnTqGmN+sh9ynjXfyu34nJKEPWtZt 2rgPYCCUMOp/Tcn0FqacAkZ46zO+cQQD7hZdHzuL2NOaJNe0ui7PdmBjRF6ZaUuVZCXe CPMl06FKbUcpJM21Q7LUzIvqtZr0ktfJdopEPE/el2JhHlEaTxsOhNT0a8RQ5GJ9znTg OsIzlmqL7bI2u5gLFNIItPuyP6Q2mzxzrjgPxF/XVLze4B2adznJ5oanXrg2Z4ot2EGC eVMcVyOnty/9jiY37y6kj2IVfezn8q+LHS4JIja6wN0S/+djQZpNgsMptREoEKkCfjBb lDDw== X-Gm-Message-State: AOAM533YSlWTdioncG04zKuI87DmzYRbqSLNIIgNXauTtW9wIAv/Dywq s/6q+zGOmUPzn7XL/JoapWzwQSskCo6NXw== X-Received: by 2002:a62:b502:0:b029:2ec:a539:e29b with SMTP id y2-20020a62b5020000b02902eca539e29bmr37269229pfe.37.1625077955432; Wed, 30 Jun 2021 11:32:35 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 13/28] target/m68k: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:11 -0700 Message-Id: <20210630183226.3290849-14-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::529; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x529.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: Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Acked-by: Laurent Vivier Signed-off-by: Richard Henderson --- target/m68k/translate.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/target/m68k/translate.c b/target/m68k/translate.c index f0c5bf9154..05b96fdda7 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -1520,16 +1520,6 @@ static void gen_exit_tb(DisasContext *s) } \ } while (0) -static inline bool use_goto_tb(DisasContext *s, uint32_t dest) -{ -#ifndef CONFIG_USER_ONLY - return (s->base.pc_first & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK) - || (s->base.pc_next & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK); -#else - return true; -#endif -} - /* Generate a jump to an immediate address. */ static void gen_jmp_tb(DisasContext *s, int n, uint32_t dest) { @@ -1537,7 +1527,7 @@ static void gen_jmp_tb(DisasContext *s, int n, uint32_t dest) update_cc_op(s); tcg_gen_movi_i32(QREG_PC, dest); gen_singlestep_exception(s); - } else if (use_goto_tb(s, dest)) { + } else if (translator_use_goto_tb(&s->base, dest)) { tcg_gen_goto_tb(n); tcg_gen_movi_i32(QREG_PC, dest); tcg_gen_exit_tb(s->base.tb, n); From patchwork Wed Jun 30 18:32:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468732 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp620488jao; Wed, 30 Jun 2021 11:52:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJ8pESl0U9VD3Br/qi17iawvw7EBU9vRk5rSRWmEr6AalfFhDuENJR+wd5CHYkDyFjksKY X-Received: by 2002:a25:5383:: with SMTP id h125mr46407347ybb.463.1625079150350; Wed, 30 Jun 2021 11:52:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625079150; cv=none; d=google.com; s=arc-20160816; b=U5GTOeWDM7OzCCyiGbGjowvfTTlJYrHGdzU7r6dtCkjeZv3sQgZZND/XAeWv/W0LvN zqMis79puC2vfHl0P6IWZUJWE7BrHKmgPDiXcmYXUXAhyxkxhGeli0wULYtbY5eAZhnt IMsTLwL12d3crMP8cbCMRLpArXikNN6bLrkK9xKjsN8iY/Px2V1Rz44dek/DCG2RBdXZ HPWSL+0maPQ4cKHoG+Jika8acAflmBmFG7UIn8wUuHo5xg8C5H4hELf06QRgvmavbNRC BA98tsh+peLix1706yoguS0bFae5qkbYgG/0OBAhKACKsMrVF0xYsZDPinal9TbE8lvp 6h+w== 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=lDoRcLaC7/1E4QoRTMLY4EqhrZiViuK6qiqJLkoqpZM=; b=r3j1CmNMTOO5CvN7iX1eopnLESMug7gPymdi+sPXqqTE5pPZcLe1hvYnjYc6DUjO2c 3rNUsCiK9ixX7018xr/8ROyMl3jgikvH7FWr3qNxnHigUjU50vdU0EN2WoPUD4wr57rM NC8FZVJq4LJQRy0xPL1V9USCiPJt22LoL5pegW8UcP87XQrjM9W/wAJhfflPQh4Z4VPP sIMnbnFPw6V7Us8fJVzNivpUwdp9aVLTxr25r3FbVq2MYIRKrRNMsU13qEhTh19UWWfp ExZy6m9je9NQk/pMqSr+bqCpD7L84CtXuClY+GZdCDrbJvlqEvrLu+DBfU19qLotrYI4 6FxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xrF/rEgI"; 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 l19si1032408ybf.467.2021.06.30.11.52.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:52:30 -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="xrF/rEgI"; 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]:52632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfK1-0001Mq-NK for patch@linaro.org; Wed, 30 Jun 2021 14:52:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45518) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0p-0005IS-M9 for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:39 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]:33529) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0n-00023N-6G for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:39 -0400 Received: by mail-pf1-x435.google.com with SMTP id s14so3383803pfg.0 for ; Wed, 30 Jun 2021 11:32:36 -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=lDoRcLaC7/1E4QoRTMLY4EqhrZiViuK6qiqJLkoqpZM=; b=xrF/rEgIZ8k3GoWRFbCJDS34TAkZPl/yEBkbSTjTBDYPIvkS7kO5UwjbJoX3wh/42i yzmepRrLiOEvIphmiYaPPNNYmhkrdXpjCEH4JnI8nyQuvrtaDjlmPan5rh40cG5RZZWK 36qSeraJ3+ed2WLjRm8S2y8JzWuNg4PqcOGSPZ1duRy0kQbHJEUPJCJsdynGgTHAnWe4 p0ZsLiX3a5rkRn8MOTFeI7KePgc2W4R/7G7WI/4XvnTky/Lq4hM8gapomPQMW6BKybsh z7fxehJkcDK0LrPgXkR8b3++tFVlTbRJaa9Jp0Mz8xjlFpm1kHPFIBuub175MUmQsSYP qK9Q== 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=lDoRcLaC7/1E4QoRTMLY4EqhrZiViuK6qiqJLkoqpZM=; b=Y1ct/R9s0Pbq/QhK7/hDPOWxJ5JiHttg6QefCUzJ5oPm5cKXExc7NyncYGejXuvoG5 LalZp76UP5WhuW3Q4cZ9EGmtFUfDmfA9yEYYQgDTD6Y1pIXbQU6yGPExnQF6HAoiIzzt g0VO0tFssqo0XoUfp0MDMT08u/A7MYpHrYPEJPYU5KztiqyBSAryesbQjdb39kboJ8/K HUOX0zhh3IEmLryU74Qdt4/ZecCfRdrb/jLvkLESGrUHknilfahRYOtLB9rcm3gVVr+3 frnTpPKgNbBtXu6jSnwmyJRdfHFu9TenhcRBg+uiC4mvNfM5cHYWrl57aOTkcVKlHQ/v YGVA== X-Gm-Message-State: AOAM530TXkrhMfhXpiurYCWnZTT+RN4V96zWBxCMUNOWUDhXD29KRkdu QZPGVgo09QW2xnrqaXsL+HUdsu/V16TecA== X-Received: by 2002:aa7:828f:0:b029:200:6e27:8c8f with SMTP id s15-20020aa7828f0000b02902006e278c8fmr37139676pfm.44.1625077955986; Wed, 30 Jun 2021 11:32:35 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 14/28] target/microblaze: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:12 -0700 Message-Id: <20210630183226.3290849-15-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::435; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x435.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" Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Cc: Edgar E. Iglesias Signed-off-by: Richard Henderson --- target/microblaze/translate.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index c1b13f4c7d..b753f080e7 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -125,15 +125,6 @@ static void gen_raise_hw_excp(DisasContext *dc, uint32_t esr_ec) gen_raise_exception_sync(dc, EXCP_HW_EXCP); } -static inline bool use_goto_tb(DisasContext *dc, target_ulong dest) -{ -#ifndef CONFIG_USER_ONLY - return (dc->base.pc_first & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK); -#else - return true; -#endif -} - static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest) { if (dc->base.singlestep_enabled) { @@ -141,7 +132,7 @@ static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest) tcg_gen_movi_i32(cpu_pc, dest); gen_helper_raise_exception(cpu_env, tmp); tcg_temp_free_i32(tmp); - } else if (use_goto_tb(dc, dest)) { + } else if (translator_use_goto_tb(&dc->base, dest)) { tcg_gen_goto_tb(n); tcg_gen_movi_i32(cpu_pc, dest); tcg_gen_exit_tb(dc->base.tb, n); From patchwork Wed Jun 30 18:32:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468726 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp616758jao; Wed, 30 Jun 2021 11:46:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRhPFVvcylN/DGzhKRNjszGMACQ+B4GR0K9HrrDfsvEqiH0pILQGB9DUqPlVucc5QNn8R2 X-Received: by 2002:a67:edd4:: with SMTP id e20mr32426561vsp.52.1625078812178; Wed, 30 Jun 2021 11:46:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625078812; cv=none; d=google.com; s=arc-20160816; b=t7p4wmX4hvAjsSdQ6TamKzII/Z3vP71RaURM7+U70xQNs+QfnoxEpJwqmyZ+GxRq00 GEx1ruvAggrfO0XHzlaUMkGEy/SNfj8fhlrUdaCwBcoMwE6qftCKDqhrSdaIBFL+YQiv 84yFofW061+iPc16pWdY4jg3NDU8bNLgUN4XvvH03nlZ6DyM08rDaF6RTxu8MlH/0cDg Qnl4bW53hTRfeKLEgZfQIMs76nLHoY2n5H0lugG2wRY4m+6VeMMfrnPV58BQoo2MPv1l x782Bt6gENvsk9wwFz156/DZxasX1J990J70oz0JkJbVNA96CgTMloBE/JxWrtNSS5xX 3+5Q== 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=1HJD3JCb9LiRtjNiA/n4zNuSXKpMe99KSR3Hi1PuyQo=; b=sqH4pkNs/vfHKh3aNuyhKP6z1cWlFVr4pwXSQA9eT8Yg9dZRsKCqTPUeMOlTCugKeF rwfoeZL9SPGwj30OVJbcz6/vjU7y0dMiEbMe57mM8q8UgF0ztu3glLcz9fCh3nq6ckds ZhPgHkiNfSFR5qTOfmna5RhbH4IBxesoT9TtEe3/9eoEZVv05s4qvyqtDmkwz/GYAnNV gGUSbAXOIWxU4iUHlbG5GknPZQi8VX5srXexF3NdRJCgbM+tYT45GgIqN6AuMJiN2+Te JD4HY7o/+2ZLlGq2Dcspzj3epavQqUZDs6v3Fvx9Vu9SmP2NRidynVSkmnTUo4xCM0Sf 5pbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="B4/45vN1"; 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 a4si14062951vsn.4.2021.06.30.11.46.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:46:52 -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="B4/45vN1"; 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]:38100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfEZ-0008O8-I1 for patch@linaro.org; Wed, 30 Jun 2021 14:46:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0q-0005Ju-1K for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:40 -0400 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]:41920) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0n-00023V-Ns for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:39 -0400 Received: by mail-pg1-x52f.google.com with SMTP id m26so3178534pgb.8 for ; Wed, 30 Jun 2021 11:32:37 -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=1HJD3JCb9LiRtjNiA/n4zNuSXKpMe99KSR3Hi1PuyQo=; b=B4/45vN1alKBnuNUinuR/wim9yW576/vzDaJwEjBTQYfzycPESOo6eod6Dc3Ws7P29 +GTlvYwBQwkyzPgJbt0D/ayimzSpUIxOkyY0+93cgBo8p6sxZmMOM+w+OIszoZubOHCz wRUUl+Oy2RDfrkMNqXR5/8MweENDB2BOujfTpTlFMIdAfYZ0TSB00E6WikdL5w3lDMIm HQMEYNiFFzecbjiN5oUOIBXXA2dtWj8abchnrDy1dHsRWLxKtO2X68eQLvUxoFb1AAB2 HA41381pqzwktExeKIrcFtHkvJELFwsKwQ/wrWAZIwlO3d5qdbwN/0sK6fI78lcQKonb KwCA== 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=1HJD3JCb9LiRtjNiA/n4zNuSXKpMe99KSR3Hi1PuyQo=; b=hKVgEQ3UIkF1U7bx7ElkwiZycgNIxd9NzauSlSltzjbUgnKD+KM+11YDhRGVyYqt5V GytJ/+CUA4y2i+cBi1genCsEAi8BArhFgOd3tJ6e48hCuVd12MtVn1S9rSe6ltzML9xr nN2D38tWa5I3DE4HU+4OEVNEtLIoZ3m/IObGISvUgWbCoilX3G+faCuIdM64K9iZrhFg qjLjpSDA+ox45qoSO3Ip9hWcAu4+ax8lCFYomb420v4REaKwYCU6wDmvSWFlIt9iEJhb 1CZz2rZiTTRKjWyUcnkA0kFbCuLWDbX1+IGLiWGYlTzNSQqqYjSg4pf7CS5QF+++wIYw oTXQ== X-Gm-Message-State: AOAM531aEOndlyC8L2ALlwPitISGvwmLhmv4GX5IePKfLuAX9gbsY7I6 HbtmYk5jdgBGimMHP4+umjki+mHH2T7DQA== X-Received: by 2002:a05:6a00:2403:b029:309:8a37:2d51 with SMTP id z3-20020a056a002403b02903098a372d51mr29424617pfh.79.1625077956640; Wed, 30 Jun 2021 11:32:36 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:36 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 15/28] target/mips: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:13 -0700 Message-Id: <20210630183226.3290849-16-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: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Cc: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/mips/tcg/translate.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index b4a454ec09..52ae88b777 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -5019,22 +5019,9 @@ static void gen_trap(DisasContext *ctx, uint32_t opc, tcg_temp_free(t1); } -static inline bool use_goto_tb(DisasContext *ctx, target_ulong dest) +static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) { - if (unlikely(ctx->base.singlestep_enabled)) { - return false; - } - -#ifndef CONFIG_USER_ONLY - return (ctx->base.tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK); -#else - return true; -#endif -} - -static inline void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) -{ - if (use_goto_tb(ctx, dest)) { + if (translator_use_goto_tb(&ctx->base, dest)) { tcg_gen_goto_tb(n); gen_save_pc(dest); tcg_gen_exit_tb(ctx->base.tb, n); From patchwork Wed Jun 30 18:32:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468735 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp624469jao; Wed, 30 Jun 2021 11:58:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9nl2Y+0qFlOHiqwFSjr50+Ym7KTQKQUajX5pazuwtIvax1aROsdee9c4l67Nsa+x11ZNo X-Received: by 2002:a5b:bc4:: with SMTP id c4mr10824789ybr.299.1625079489521; Wed, 30 Jun 2021 11:58:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625079489; cv=none; d=google.com; s=arc-20160816; b=WpGwlU/qHq7xmbHM7vWcZljwahojDh2vSVYqkaVZ+TVPDNyMfD0Ox6UMwqUaVVIQ8o WTZhRW/U6uvrNI3RzJO3qT4CBGgG8zdEmgOtr8ldMypj2H57cdDXeCEKhfg3PRy4/3p7 ya0IZgnsFc+LrHiXviqDDqEuuClIC/c7h4Ji75vxiokZbldgetkmCkMo/XdHw12c+CYL ebDXUnggbBTyW/1mb6gIpw0yfcpb4sCfSe2+235sJ4tITM3VkIg+hF6EUtSs7QhDUEPX wXY2c2foWw0jBCnz3irI8RESmMWAmYsGzFpjjIGUd3lQzDvIMIH267wi1Tpoau1vCWWe AX5Q== 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=pff8c+CXaZuYQN3AC9HgnBb8y6h8lxovDgoF+viWASM=; b=OOPtsfGbEGk0oymbyAALn4GFtQ6dhP5aMrl/Vp7KqTdv6ZpdDmZqWtPhTdHxdK0oBM KZT19Jyc7C/nj7JRfrpOLQ8y+4eI/KKMGTyZUE9tFzxn/1NbPbHkehPSXiScDnVeqS+c rbK2V9qRunM75F2Xl+CNHK7RyIvPqd4SSn8Uy9lmpvyaFNwOjwKsXLPmapIx6n3nhZE9 tkTLJLsdizDH3kyREnEc8ODjZPhMYN+YFZs6jvTcR0gldM+mwU8C72LfDxEZVD+4vgkk Bzqed9HSSkO917d2MCZ80F2hXIfUN6bTAfZtPf1ILkL3I2RHcf8H1fa7FUMagPscf0qE g2Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RUck+Mox; 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 k16si19247995ybp.113.2021.06.30.11.58.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:58: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=RUck+Mox; 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]:41534 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfPU-0004ZX-UO for patch@linaro.org; Wed, 30 Jun 2021 14:58:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0t-0005W1-3x for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:43 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]:35509) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0o-00024I-H6 for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:42 -0400 Received: by mail-pj1-x1035.google.com with SMTP id pf4-20020a17090b1d84b029016f6699c3f2so4949695pjb.0 for ; Wed, 30 Jun 2021 11:32:38 -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=pff8c+CXaZuYQN3AC9HgnBb8y6h8lxovDgoF+viWASM=; b=RUck+Moxk5bH3lg6sK9LjSOnLcST6ee635ckGnNir+1HW6yM6NWBMQ+BSm2HVdgWiG ged+KzAZ70Ipi7b+IVa07cMv9LV4Fnv6lONyAoJve+vNTKlUFiC+U9fkxAj2ZKUqZe/l dcw9zS/w2EOKLOvG2QpAiMz2tAEiEsTBdmZfOLuuFxBH4hjLOJhHiDicaIfWBUxpkXae U+LbFQEemHKmTqNIQ0pOiJngbkPARVdY7bk/Tt54sXks6avz+cGZLP2YEunTJx+2GZJ/ UHu0Jobxe6lFAoaU4CRJIFjOiuQBdhx08CMS38oON3UkYMRExRSibLKwDBceazNZPIMn ZZSA== 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=pff8c+CXaZuYQN3AC9HgnBb8y6h8lxovDgoF+viWASM=; b=KktUGcBZy26iw29c5KZe+0Tk9fguKA684wFt35KTO0zaDjEJmTBLwhMlc6NEFq2tI5 7ggjjP0aID5yodo2uuQtxjzwACmelLQelSCqKCWJh0rxw2MIJv5RxLEriIqpaHr++hdv nEYIwdv+hC6TiAlxgu01Gb+dqtKMlSWgiGH9hBa1Zaz71ACeOMB/s6C0OiVsrhjBAyOI iBcPyMuMpx38jwt0vDsepudMedBpvxyG7eg5C6rYuDdO6k42eTskjmK2DtPkjrHEG91w TbkJ/aJbgkJLAucd/UEs2xkNFQa/Yqvt/wT+UwXWAMjd8UDQRaf5DctEfca2jiCBTpOB YEeg== X-Gm-Message-State: AOAM533x5cfEYsmddpgGkWgHwOkqyA/Go5MEn1X1i3lxKkYC7fug0ot1 x5F+V6D6lNT8wCEqM0EjS9y1p7vWM5ENYg== X-Received: by 2002:a17:902:b082:b029:113:e50d:c404 with SMTP id p2-20020a170902b082b0290113e50dc404mr32923002plr.5.1625077957259; Wed, 30 Jun 2021 11:32:37 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:37 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 16/28] target/mips: Fix missing else in gen_goto_tb Date: Wed, 30 Jun 2021 11:32:14 -0700 Message-Id: <20210630183226.3290849-17-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::1035; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1035.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: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Do not emit dead code for the singlestep_enabled case, after having exited the TB with a debug exception. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/mips/tcg/translate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.25.1 diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index 52ae88b777..17e79f3de3 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -5030,8 +5030,9 @@ static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) if (ctx->base.singlestep_enabled) { save_cpu_state(ctx, 0); gen_helper_raise_exception_debug(cpu_env); + } else { + tcg_gen_lookup_and_goto_ptr(); } - tcg_gen_lookup_and_goto_ptr(); } } From patchwork Wed Jun 30 18:32:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468719 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp612508jao; Wed, 30 Jun 2021 11:40:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyXI22MVIod8cygFi8lTKUOf4d8cIxZLhFYZHI+IAWmsFV3ySPjx+exPD5vHiuaSeQkpap X-Received: by 2002:a25:11c5:: with SMTP id 188mr46595365ybr.322.1625078442201; Wed, 30 Jun 2021 11:40:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625078442; cv=none; d=google.com; s=arc-20160816; b=AFU1b8wlabYFucwT/HoBzmvsyM//k0xSP+3shHbwZTxZXX3wiGMqIYYgwDPo/q5Iyg Tt7kSkUs4JxMwNlmLuGD/P9jNZGGnzc7zWhjjz7UD1kLxJPcsNIn2xEiAHYKEruHZ3nD uMSElJtZ+r4kWahMGPADV9OQGGYkJ8IgCWPxXbvrg7oAbj4dON/rFgk2h8IuThRzJ7h3 VuO8NTrEqaBNo6fmaiauKPkPRt31mh2/ucF5IkrLCHHFAs1wMIemHi64ghDrIOPXzcIy H+YvEDUFI3X42+2Pt8A8ODh076ZBskPQe0QfI1JdjEGippKkS+w+22QfEuKu8Lzf2dGx Tomw== 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=EuLUTgtrIq55E1MmI7/EbN0xfKvn2I2h2MjVLgAIedQ=; b=rw9sLJ7zdv8MM9xU8Nu9XLsf6j2pYS4u0YZ2Bq8KHX6UUxhHYBZV1z1QdFxinqucTc 8KLhl5eWi+Xkt1ZAXJqvp1AiQdp4JBOdHgAlZBhYdqujyCFCHokmVpMzHLxY/NLATfsa R42pnQn6SjC98ULBdcxLR/uuZwtCrgZsiRp8L443ftFGjFWl3mmuPYI560eao9h+fOxi tzSRjBEuUy74R9yGscFP2X+a6jJVlreePdCxsgm/OdWa3Xh8GuWyqMLJ/kqEkVOC/5FW irizZmD/hAGv9y1TZ/HCZPdo8R9Orrk+FyvsYaj6aDlOoYto7R3HjzFqnOsTGYMHHwEP j3/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UrOWh+BK; 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=fail (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 t90si10629062ybi.283.2021.06.30.11.40.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:40:42 -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=fail header.i=@linaro.org header.s=google header.b=UrOWh+BK; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54024 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyf8b-0008Vf-KA for patch@linaro.org; Wed, 30 Jun 2021 14:40:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45566) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0r-0005PF-Bt for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:41 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]:33523) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0p-00024V-4n for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:41 -0400 Received: by mail-pf1-x42e.google.com with SMTP id s14so3383874pfg.0 for ; Wed, 30 Jun 2021 11:32:38 -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=EuLUTgtrIq55E1MmI7/EbN0xfKvn2I2h2MjVLgAIedQ=; b=UrOWh+BK3L8ETRDsP8Ny8m/0mTdoevAuICl3w6B7WefVtUFRDoawh8Amb81zHoohfY 9LwI+4N0jm2IWPzZJfXQdPX5o1P8qYOl5HAg/zqmyxhuJOg9Joavv0upY9+ls/YYm749 7r/KGdbr6PcQ6umWu0ZxG91l/NHCVQImpTKUGrR+xPC/uozb4n3Yj4NuhrnhME+ZAA8a IRH40ySPVuQmIsXwkXDLBSidRdEWtJ1apzFRgjWb7D8NK0Y+FfnbB7QuAY5ek04ZZDrO BHSifbV5MUatkfpmHNhsBheiqFwBxHPiHb8AAjYcYNe+lnTq8AKICwcRLeOliriivJkb uXEQ== 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=EuLUTgtrIq55E1MmI7/EbN0xfKvn2I2h2MjVLgAIedQ=; b=fn246X42lWFPEAF53RNfDsRbDIVWTmNaS+tGncOVnIw/iFPVgZCK6El9hCJ1rqq1BA QZakMB4lTM8y9BVZ07USTFRcpxSucvV+ady6TUIBWBTz2ELsPuSysy4/UobZ/BXGCb49 t5+RJSzr9Qg3JeO+oyoz1MQsNzhuS7n0Hz1GhO3Q0Q9eSOSm3V1qREmYJ7G7pjGd/nrr h7KoAIoSojX6tFIpkgPvIMbxfrARbkeGkrHQZIxlO/CPwXpdK0yO6n17HQqhdQVFalna AD/QcVFirpd4NDiVdX0K7EsPiXPr+N6lU8F8dLH82cwYCuINy3v9mUOoeRkDqxdO8nzQ sdkg== X-Gm-Message-State: AOAM531x0IxxY7zCKiRKvZfXd7OhHimzlioOBB6UdcCDqLJh9gBFM0NA Nz5BuI4jXSr17+hMgfuF0Q+bRbyLmf8UMg== X-Received: by 2002:aa7:9a5e:0:b029:305:5d37:7622 with SMTP id x30-20020aa79a5e0000b02903055d377622mr6682982pfj.2.1625077957884; Wed, 30 Jun 2021 11:32:37 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:37 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 17/28] target/nios2: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:15 -0700 Message-Id: <20210630183226.3290849-18-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::42e; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42e.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: Marek Vasut , Chris Wulff Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Cc: Chris Wulff Cc: Marek Vasut Signed-off-by: Richard Henderson --- target/nios2/translate.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/target/nios2/translate.c b/target/nios2/translate.c index 930f3d3395..17742cebc7 100644 --- a/target/nios2/translate.c +++ b/target/nios2/translate.c @@ -150,24 +150,11 @@ static void t_gen_helper_raise_exception(DisasContext *dc, dc->base.is_jmp = DISAS_NORETURN; } -static bool use_goto_tb(DisasContext *dc, uint32_t dest) -{ - if (unlikely(dc->base.singlestep_enabled)) { - return false; - } - -#ifndef CONFIG_USER_ONLY - return (dc->base.pc_first & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK); -#else - return true; -#endif -} - static void gen_goto_tb(DisasContext *dc, int n, uint32_t dest) { const TranslationBlock *tb = dc->base.tb; - if (use_goto_tb(dc, dest)) { + if (translator_use_goto_tb(&dc->base, dest)) { tcg_gen_goto_tb(n); tcg_gen_movi_tl(cpu_R[R_PC], dest); tcg_gen_exit_tb(tb, n); From patchwork Wed Jun 30 18:32:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468736 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp626075jao; Wed, 30 Jun 2021 12:00:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytbDrd5FHF8hZ53EJtazqckP+aRxOfOdG3gS65TUIUsuTtz0HR7kuEZ7hOKXVn23Pk7PIZ X-Received: by 2002:a25:690e:: with SMTP id e14mr27869558ybc.277.1625079624872; Wed, 30 Jun 2021 12:00:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625079624; cv=none; d=google.com; s=arc-20160816; b=rhsNyyUN+jTSDChylorYVNVwnO9eMnJ8TXZhgoppZrcXFkuRLD+gsKUiCW+g4H2EVj 0is4x86o+tZ9xoaeYTqu2BMuQvuuDLCnNnlYjGfaUTWU3blnspX6UruVQ8gFpz1PYzNZ xbM8idhqM4bpdpH2kK1LvVeOjw74SIBJQlPJk+WaciX53NLzD7XYPSkjNT/nkQbpafkP jahVfXgawCu2UGSlG00kw0/laUaeEfyuLPbNCY/v/C5dSKMdN2LhoTSFUAdsx+7Un5t+ GnQy/O+wtiM/eoMb2H0KIhlY46CMBWzto6XTX3g+I6SGGAm3uyON0gHCP1wVUC7JGQSV zQXg== 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=zAnCrHtff6jPTMINAA/XQ8amtOalFE7ZmPKzxH7D+ug=; b=zsgmcTTRscCH4Ufv5MmN9juIWi9MxN2pI+yib56Ba8uSt/z0uuHAiO8blW69Jo/Ihv vDrXzKDXfE/qnC/wlBaCLp9OKaLWL0PkpCBLi31pAlgiFztCW4Qqo9yKSHOra0OsuiLg JQNOV9S32aPwAZz/z+hLU4IJBPPMxUZ8ZVlw0WsFiBUDzs7QL7DByn7XIbBEff2eiQD5 EtcHN1uf/cXxy+d5Wxqj9flZ/vsEQT8RPZ5Qq8Z3Fxh+zIyxiItXINK/GnI9e7N0v+Qk 8DHT4hR50B8ir69U4inBsXO3SkRv/Me/+7t0NqrItozLDTK3EdfZ/0NP0OuAZduBCno6 NoTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PyIoG7fq; 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 y14si18755591ybg.154.2021.06.30.12.00.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 12:00:24 -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=PyIoG7fq; 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]:50350 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfRg-0002Gt-4a for patch@linaro.org; Wed, 30 Jun 2021 15:00:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0t-0005WF-5b for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:43 -0400 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]:45759) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0p-00024h-MT for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:42 -0400 Received: by mail-pj1-x1036.google.com with SMTP id z3-20020a17090a3983b029016bc232e40bso1983305pjb.4 for ; Wed, 30 Jun 2021 11:32:39 -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=zAnCrHtff6jPTMINAA/XQ8amtOalFE7ZmPKzxH7D+ug=; b=PyIoG7fqNcEfFFQ4gNjJia2QzE6oMaOP97nFiokhYPZyiEz9+WinGExIM0Pxv2iWY4 0eRWmX+YannV1JkCm+iWDO61JsSo0eEvjlxsg3yWd4AlJ3dKWVZHaPJrUhv9wKqHR2rH 9SGi6m/7AHKcBLiWembfrdkutc1TKuhwnRWE9jidUdA0ghmtr6WgYlX/isyeMC9ahx0S UZNfllpFq7bcfYu0bDrM9DjIxOz+92Q0KFPACUCjcnSLW2X27lCYH+7iBjScX+ZE+Dzn aUgza9k6z1eYXPOu/diW0UhE23qN4d3uOKT6RL0NNVAdR/iBJc0HfARzDkW6lTE2qPXo CbDw== 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=zAnCrHtff6jPTMINAA/XQ8amtOalFE7ZmPKzxH7D+ug=; b=EIzLFvcdeL5Kywz4ksZTQ3UW6IAZ+jZLSEEdHH6FYdtWMd+9uiw74OcHQ+u9KAjack C26SqZMfqvdMgFTLF+KwcqtxYG/5rSbflkKffnc/lT/v/5x+r4tyDbpoOI3JJM9ryv+l O+E6dreMu5xwgW1s3U1rh1l+3ILvTIHiIU7tqy2SydhE7bF8TAFBabFsHj4mzsKG7kd4 f6qIXQKoJqFCq1h/H2bL6DgAqmOekOnY+J706virDAQfrm9QgOHdO+ppV2DP7QUMF3mX zAThamJhMWRu7wYXdymz/Y4Fm4cMiXsbuO6VaQka3gORD08podICjTt4ERywLsaMz57W oEZw== X-Gm-Message-State: AOAM532OmSWXA+42u5u7OZoq4dfbPwgJdbTyCDY21VhHiMzas4mlP6SP z0194Zmpp7GgNnIEi0M/nOkAL0llXOLBGA== X-Received: by 2002:a17:902:8ec7:b029:119:a15f:3a1c with SMTP id x7-20020a1709028ec7b0290119a15f3a1cmr33701713plo.48.1625077958425; Wed, 30 Jun 2021 11:32:38 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 18/28] target/openrisc: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:16 -0700 Message-Id: <20210630183226.3290849-19-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::1036; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1036.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: Stafford Horne Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Reorder the cases in openrisc_tr_tb_stop to make this easier to read. Cc: Stafford Horne Signed-off-by: Richard Henderson --- target/openrisc/translate.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) -- 2.25.1 Reviewed-by: Stafford Horne diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index a9c81f8bd5..2d142d8577 100644 --- a/target/openrisc/translate.c +++ b/target/openrisc/translate.c @@ -1720,16 +1720,17 @@ static void openrisc_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs) /* fallthru */ case DISAS_TOO_MANY: - if (unlikely(dc->base.singlestep_enabled)) { - tcg_gen_movi_tl(cpu_pc, jmp_dest); - gen_exception(dc, EXCP_DEBUG); - } else if ((dc->base.pc_first ^ jmp_dest) & TARGET_PAGE_MASK) { - tcg_gen_movi_tl(cpu_pc, jmp_dest); - tcg_gen_lookup_and_goto_ptr(); - } else { + if (translator_use_goto_tb(&dc->base, jmp_dest)) { tcg_gen_goto_tb(0); tcg_gen_movi_tl(cpu_pc, jmp_dest); tcg_gen_exit_tb(dc->base.tb, 0); + break; + } + tcg_gen_movi_tl(cpu_pc, jmp_dest); + if (unlikely(dc->base.singlestep_enabled)) { + gen_exception(dc, EXCP_DEBUG); + } else { + tcg_gen_lookup_and_goto_ptr(); } break; From patchwork Wed Jun 30 18:32:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468733 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp621790jao; Wed, 30 Jun 2021 11:54:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzJTQbjCAFwFO7qn4mjoplLTkB1+LAvY12jXSh3zDJOwlkRY6bkX++2I0e9JSfTM4UxH5b X-Received: by 2002:a9f:2e1a:: with SMTP id t26mr34821431uaj.31.1625079262684; Wed, 30 Jun 2021 11:54:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625079262; cv=none; d=google.com; s=arc-20160816; b=SDvx3aV40Lz/UobOHYeYhWSfM8eI+lQyNC1MZQpPIA+L/rH+j0p4KkzSD974ZwnQtk mU9Qy5EppiSI1nX71qtFH8EHdqAQb/b/OnhGWnQ52LSkxkVgz8IG4Y0RO4hQgCYJWDO8 Y7Vnh90OYTTgLdnj7Xh8yVVQD5fFh0OD4kr+75du73msCFSRTulE+iCmwOp6GaFO9duI 03XJ5Bqb8W/o1RBu9+yEdwxOrH9+51Dp5uhlUsFQwWCWxhdYYP4nMFi/6TJW+q0p5O+C UNAGYFK1Va5kHDxJ7h723CFT/SNYGWL1WSAcn5nv8rEfTp/7s9AxbgbEktVNBkBQ1dMd LOSw== 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=CGijMJQVEM12PQG7khoLYEEx6Kld5VypBBc7yQ7jwvM=; b=VJ7pqN/hJYbyjkDtSr5SViMP25Na77v0iMd5zkoOAyeUqlX4/ljBlHchenz5pwHB4K jEM89sffizB91S8xTRKmcVUU59zDxYtLRszQxLyWthdCX//CQ8sgIyzNZsmyIQXU4lv9 n+SgbrZ8s1U9z84xu+zc0HpBv5OB+r2S/KT4YksQPYOwgXeCqI7MgVDD4ojhM2JSfyBa kj/746oclVJv7kgAg0ejvoptcg5Op/Pi3IHezdBS2N+DjmwSe35zh5AuiK6uGcLinto9 9U/FNYmvZIS69tFz9uKAyBFi2EtoiN7+9zhur+iRZ/5qryi4bvDGyK+n4dPfnuon4s5G 1Ptg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VTYPQBjK; 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 o138si9718568vko.10.2021.06.30.11.54.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:54:22 -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=VTYPQBjK; 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]:32960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfLp-00078n-VD for patch@linaro.org; Wed, 30 Jun 2021 14:54:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45596) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0s-0005TN-Bv for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:42 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]:44004) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0q-000259-6F for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:42 -0400 Received: by mail-pg1-x533.google.com with SMTP id o18so2557592pgu.10 for ; Wed, 30 Jun 2021 11:32:39 -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=CGijMJQVEM12PQG7khoLYEEx6Kld5VypBBc7yQ7jwvM=; b=VTYPQBjK6p7DYGo5l6qZl0gdVcIQLlyb8ZC+vJvs1a7w+LvQJZRcjZKhmiraFvfCge 3qRCpYDKtOHfnWQked0FrdlwPl6xqB6IIMAnfOYbqZh6GqTHidT3rgCZ2vI7HY+GQsqV /AXCi/ozG2ug0csPqsWV9j8Vy4f+XSHahHuO5GuAF7UWtFf7c6itaVc1wVBy+Vxs7STg dyzI6PhlGgeU0OrzZkJyPTgS/XTszqBt++MIKUuL7Mshd0foS+spLNh3QpolJuDZ5q9w ro/C1m1XY7cFBlzzViyXYhifgEzRAVgp/CfmdyfejPONyXrA01jfoqEUyXW8/6Rsi1pr A5Lg== 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=CGijMJQVEM12PQG7khoLYEEx6Kld5VypBBc7yQ7jwvM=; b=tRUscqEDfKuhYc2avK407SILJEOj9sRExdt35fIAjNfK8T6F4Xv8uBe9kPufN/BASu To/bGxkoFijxFeaqjcgm6H8Q/oGUjJi8u4TDHtcVKzE5eRbOlx0nmrRjiKjrSQ9ja5kW kk8pfVa2x1kfcz6fd5Z8iioZzXoGVweVopxx0jX3h57m/UGGPD8s8pFRPVDgDyvTyht2 TWS/Seh4wXIEdGYJpx+r/NKqq/G2vyLbyNmDcxaDcj4Qf5g9zl6v3mSYwggx5oh/dYnN NyUPzS+s2nIS6jIgOy3X0rH6cJk4g20LGs7jC6pSSD6hf7DUJTyqjarMVu/UgTyPwugk SF7A== X-Gm-Message-State: AOAM530nSiBWkHM+BPzFibZm4eZbl/FfJd5C45FBBA7ef0iNbS8/42xU 1u0s0Wh8fJxQ/kYQqFciQt8pjhKXgbikNw== X-Received: by 2002:a63:dc06:: with SMTP id s6mr35787279pgg.39.1625077958903; Wed, 30 Jun 2021 11:32:38 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 19/28] target/ppc: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:17 -0700 Message-Id: <20210630183226.3290849-20-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::533; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-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: Luis Pires Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Luis Pires Signed-off-by: Richard Henderson --- target/ppc/translate.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) -- 2.25.1 diff --git a/target/ppc/translate.c b/target/ppc/translate.c index f65d1e81ea..0fb09f2301 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -4302,15 +4302,7 @@ static inline void gen_update_cfar(DisasContext *ctx, target_ulong nip) static inline bool use_goto_tb(DisasContext *ctx, target_ulong dest) { - if (unlikely(ctx->singlestep_enabled)) { - return false; - } - -#ifndef CONFIG_USER_ONLY - return (ctx->base.tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK); -#else - return true; -#endif + return translator_use_goto_tb(&ctx->base, dest); } static void gen_lookup_and_goto_ptr(DisasContext *ctx) From patchwork Wed Jun 30 18:32:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468737 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp629741jao; Wed, 30 Jun 2021 12:04:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVCfGZJqoSZL70U6Djlm0kQTw7Lfcftvx0RnwqHO90F4qjr95KBZ4jeNZf0EIz/MqhTiZb X-Received: by 2002:a25:e685:: with SMTP id d127mr18205511ybh.513.1625079850590; Wed, 30 Jun 2021 12:04:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625079850; cv=none; d=google.com; s=arc-20160816; b=ngvu1s8nOaaRjFHUaQlfAUDRQQjU6u8At1+3Ik2n6UbEeqtexh5uWO3Y0nwZ8ZRhGA brSdhdxZ4IWLpjtKYrDjiz8ncBZj6fZRNcjqd2Mpzs3o2aSvVYCAvCbTCIHMRoI9e+Co P2zx/KhLj34NouwZ70+lxZ9pVOzJM2D/NfHGsaYPT4Gs1ojjr55RFl7EI8F6cnaxYv2o 10d0zpTKyYjgImmnezbOmHza6WT4ZPK070lsv+gI5kWp7AsA4bbT0hUMzK2LRU+lqP34 A19zP5kQVqxYrYNanFb97FfZssB3NOziN3iV1iJvwWhzepRTbsO+rRAchLNwIOcNiSre opSg== 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=Q7Ia+ie6XOcjpcC/dD6Ub5PbrcGQ/yV9nqv+RZL1T9E=; b=FHKzOvXIRfuRKNOss5EiFNu2m7vwXl33AtwIULeDk+CO/qZVLEEDqGRqg9qYthz62Q AYH4N9E1SOSgGcb8gyWyff5+HxIkxZC8lx3RCEE7vQwRjceB0d2k48T3FI61I8Ep+aQf ieNK3TSA2QixZ3RBGM9JaDiKbswhFH9l4UrceJyr/CFWGf1jq+s4JcoPd4KO9IqHSEhB OEXKgc1MscK4vASZ9yR5DYtDcQp+sifgncr+M/l6iP3f9rPuOpWKEOI0zHpm028muHb6 acRzwuVcu2bZVIEYdAxItKs+CLYhxsC6Brqdq6pEIdQgXl96VUe2T2YrypAemu97gc8K Q3WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GdyoU+pD; 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 x3si5273306ybk.435.2021.06.30.12.04.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 12:04:10 -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=GdyoU+pD; 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]:57864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfVK-0007ZC-18 for patch@linaro.org; Wed, 30 Jun 2021 15:04:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0t-0005Xg-JU for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:43 -0400 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]:36505) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0q-000269-Nl for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:43 -0400 Received: by mail-pg1-x52b.google.com with SMTP id e33so3206977pgm.3 for ; Wed, 30 Jun 2021 11:32:40 -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=Q7Ia+ie6XOcjpcC/dD6Ub5PbrcGQ/yV9nqv+RZL1T9E=; b=GdyoU+pDjgC5vaOIFMPFPUzeA4XDK1U2IbSm0CjZKckHXgoDFxl87b2v5PfcFyMzGv p4GEg5P117AM8ysRPeVnZKuLTOoynPSxIjylJYdkdobwd40J8ApFLpdCvyCSL5fQcUV4 8siXASKGrDvwMb3tU6YJvPsdkK7UC3hwLFKklvaDYyYUun7PVrYV4by1oQEfED5V74hy 1lgmOfm3qMJQG4q2qHtcAEDztAFx+BwX/kFDV00zIeS/SE34N0OisOl44IAwVwVTckP8 PcKYdpxBLwGRBMi/LBN0K6ePDsjcSQHVoa7rJ2VVcSTtTsZyhvvyar8U1oWjNCLIFegp qBEQ== 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=Q7Ia+ie6XOcjpcC/dD6Ub5PbrcGQ/yV9nqv+RZL1T9E=; b=S6eySFVe33ItExAzEgMGOrf/IyhN7d5VWtQigYbkVTPz9N/V1hRiT9rHMQ6gz6jzWn IMrZCb17XyCwYIUKCjnSAqPjRqQf5reHlrnG0zxFKsWInI6fzs9xpuPvzGGSRxX/uwi1 SYYd4Zq0pUzA6k4/hS5urEZJ4oqjQAgpPwrfhZX8icvKlWsZ70LrgTUdVOCnFfR+rDTS wcu3Kl5VhRvtm2JEMTDki0zwWaRNWJ8QU/n7ot8maCIQtnbzcgdQapkhIiYfrluPKGNY vIlkR1xicpLExIraTakpxnLZU4TlYMtks321xFc8tRz/d9oqMXz6awGBw606pCyT2Yt/ Uikw== X-Gm-Message-State: AOAM533xN0rTVIWtr0vshNbucpIoacnpWnBPOjW69p6S1Da5OVit/5zq hWpa4iECHg1cvSsh2XQThOA5bS0dcEwZrQ== X-Received: by 2002:aa7:8d5a:0:b029:302:e2cb:6d79 with SMTP id s26-20020aa78d5a0000b0290302e2cb6d79mr36886657pfe.71.1625077959472; Wed, 30 Jun 2021 11:32:39 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:39 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 20/28] target/riscv: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:18 -0700 Message-Id: <20210630183226.3290849-21-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::52b; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52b.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: Alistair Francis Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Reviewed-by: Alistair Francis Signed-off-by: Richard Henderson --- target/riscv/translate.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) -- 2.25.1 diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 62a7d7e4c7..deda0c8a44 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -168,29 +168,11 @@ static void gen_exception_inst_addr_mis(DisasContext *ctx) generate_exception_mtval(ctx, RISCV_EXCP_INST_ADDR_MIS); } -static inline bool use_goto_tb(DisasContext *ctx, target_ulong dest) -{ - if (unlikely(ctx->base.singlestep_enabled)) { - return false; - } - -#ifndef CONFIG_USER_ONLY - return (ctx->base.tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK); -#else - return true; -#endif -} - static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) { - if (use_goto_tb(ctx, dest)) { - /* chaining is only allowed when the jump is to the same page */ + if (translator_use_goto_tb(&ctx->base, dest)) { tcg_gen_goto_tb(n); tcg_gen_movi_tl(cpu_pc, dest); - - /* No need to check for single stepping here as use_goto_tb() will - * return false in case of single stepping. - */ tcg_gen_exit_tb(ctx->base.tb, n); } else { tcg_gen_movi_tl(cpu_pc, dest); From patchwork Wed Jun 30 18:32:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468728 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp617423jao; Wed, 30 Jun 2021 11:47:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEOI58v+Bk9pPxymbx/SckR7zeicqgjIMfqRray4Rdz76mEnwxweasqJOXo2CKGJ76bnv7 X-Received: by 2002:ab0:3b8a:: with SMTP id p10mr323812uaw.101.1625078876133; Wed, 30 Jun 2021 11:47:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625078876; cv=none; d=google.com; s=arc-20160816; b=ny7hmhX85FbC0o0agc4PVv+ZrrozsD27BO2SloLjaQd3dJ6/8xua2Yn73STdaqnX5t l6dCZ3ncjEc6nk76chX8LS9sMFcPtGX9c6ELJ7qh7tsgSs9H34iDEv2MuOZSoA6RjBeH bPrCJWm9iX7Yl9ZGV4K2cPIeT9j5yKe1JHfpOTwQbk/FhA+mGWgEHrYVR7LJFpFDtRz0 cX03EWHpBZ8MEG7Ui2i93vTksamJHhihcU1VCGEBPpltSP4VTnmWhNnKRxlNm9gZ2pWo Qs4UVMxlGlwDjKtc1ina53Ph4lh8XUDMQhHrOIZYRWCsoJWk9LlZcKk1xmTU7pZX2GCS T4fQ== 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=W7Bf8v32MRSYl5delt6pF1CYpdgvOX/1OeFQMhwwhYo=; b=dULztgqp3+QG6wqf283UPkElxvTgkgsWRws8BOM55f1Ajlx3GXf57WcUrbaG0+8jLF +Y7kNmmqlO9wwW/n68YcR2dfXxou1ruWdGLKhJwJ5blp3JWpOU+6b6/K+XXNaWsIgTdk tYMor4hJs4uSY+2qMKGfgiA6D+WUHGQ4j2UrJrLhVZIg7/FzwydZUOsPAXNAlkuz9oAw G1l0/hTZzBD99ZDURAnWAppwt8QxLHnqrKHqfGjB6JEJGWRUnOodeNnIuaOH2+fgxqyD FRiLdfGV67Uf4ZQLxFhgTIs3z0nr8qb0NUE3MhWeUoni/PFIdZsGbHPUrH/Wi+H9txjj tDTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="zLdNxDS/"; 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 t9si14636145vsm.403.2021.06.30.11.47.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:47:56 -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="zLdNxDS/"; 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]:44456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfFb-0004JL-GM for patch@linaro.org; Wed, 30 Jun 2021 14:47:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45672) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0v-0005dk-39 for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:45 -0400 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]:44725) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0r-00026z-Lh for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:44 -0400 Received: by mail-pj1-x102e.google.com with SMTP id p4-20020a17090a9304b029016f3020d867so1983238pjo.3 for ; Wed, 30 Jun 2021 11:32:41 -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=W7Bf8v32MRSYl5delt6pF1CYpdgvOX/1OeFQMhwwhYo=; b=zLdNxDS/9nIA/hJzfGAANmqjF72c2ANkI8RjF0uZrGy6jnhrVWcbzaPvHy8kB51ibg LLPdZgnhGa+EPCgekHtH/sOnnYlR8T9Sv8bkk3K/zVwjqxaclUa4xBFX70zVgTNHSR10 RLJV6jHx6KruEjNbRX4Ro2tJR8rZtR1rqHuq9aXZR8pLcdFl1vfav40+YAgORLW/cf7h ZFqfP1LiN5vQXNnfeQ/Ao19DiorkWHyH8flgpL1hgsfK8plpuDXL6pieyDWG5oxN9Oso Hegp4WaUfJXAADDYSZaqFCApgD1wyhONXd4kt78oYdo0Nyz46xWsccI3Rp1QyosvSZdR e5Dw== 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=W7Bf8v32MRSYl5delt6pF1CYpdgvOX/1OeFQMhwwhYo=; b=Yx4zzXthQrvcxdp5OWSBpO4srfde6UMNKpmyEzvw3auIl9MuoY4Gt4+NLLUE18rKMT 1aUTKNSTkRfA55CS5dVPOX7dYIFg+MP/0kUik8Eypms8pi55H1Oc7RAXA1ZL+Nvz/3yt BDX/JAv2k3hNC6BVVJ5NtOqsnmptQmymu5qJiFwiPqUW0KDrr3pVkudu1qbKiTARGnGC nZ3rqPDuZDQZHhGa+B4Nl6mvqSPjPdF8p2YVvk3bppj+JHg4k+E6uwbeoqHvyL7GIDez q6Pkucsgk06FQjg87KEduoMzb0QvpjGC8EsdG4vNmly1djrqDyb2KAC2bC2i259PGZ/v 94Ig== X-Gm-Message-State: AOAM531v5al/CrSrvsjXVlGJ0OUjFW6Le1EyBW+1bXPUBqucd6nTlsgR 9QifTaqRou4ZJEcKsjku8tCuqq2TUw0zjw== X-Received: by 2002:a17:902:7402:b029:129:aef:6e3d with SMTP id g2-20020a1709027402b02901290aef6e3dmr6593937pll.60.1625077960447; Wed, 30 Jun 2021 11:32:40 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:40 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 21/28] target/rx: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:19 -0700 Message-Id: <20210630183226.3290849-22-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::102e; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102e.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: Yoshinori Sato Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Cc: Yoshinori Sato Signed-off-by: Richard Henderson --- target/rx/translate.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/target/rx/translate.c b/target/rx/translate.c index 9ea941c630..2443406de5 100644 --- a/target/rx/translate.c +++ b/target/rx/translate.c @@ -143,18 +143,9 @@ void rx_cpu_dump_state(CPUState *cs, FILE *f, int flags) } } -static bool use_goto_tb(DisasContext *dc, target_ulong dest) -{ - if (unlikely(dc->base.singlestep_enabled)) { - return false; - } else { - return true; - } -} - static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest) { - if (use_goto_tb(dc, dest)) { + if (translator_use_goto_tb(&dc->base, dest)) { tcg_gen_goto_tb(n); tcg_gen_movi_i32(cpu_pc, dest); tcg_gen_exit_tb(dc->base.tb, n); From patchwork Wed Jun 30 18:32:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468724 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp615469jao; Wed, 30 Jun 2021 11:44:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRICD766Rn3BZlW+Ku/5+Je8aIbuEtuLyFgsqoBBnBoDNZWpwoLfkqnBtFu9PQhNdyDXtu X-Received: by 2002:ac8:7ca8:: with SMTP id z8mr27612814qtv.27.1625078692822; Wed, 30 Jun 2021 11:44:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625078692; cv=none; d=google.com; s=arc-20160816; b=f25pU6j9IyH0pRDKiJByssVObfr+DGav+Kf5KaLgBQoZVvTaiueDMA8QFzvnm4MyWQ XB7BrtQ9NmqAmm8uP/9uvYl7WL16xaqVyTCRehVptywrKdu6m+SAJ31lnBxFIxkCikgk G30ZT06NcIVvuvlvNhEP+1ksR8h3Ih+kWbOcPrenD17+yySRERIgeNVfLAfsnaR2leHj 7oxIfKIXfX/G19AWXDHscVRziBKVynZ9PEENfniWIABnpy9yyaiadqP2DeyUMOmcxKk0 GGeVcjxU4iwmj4KYDlJhVhXai6YX1ZLOZm7bKKonuU+l1DNIshweU655X1Yqt3NsWKcL rsCA== 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=vJrlNdqM0KKCTgAnUoRaR9ScUOgl0wituQHo+qblcXE=; b=iGNFPmZt4EEbg9WJDcwMIMskhV06PEjCL9Nimx8JEwFOE8U9SMSx3UcstiqTdQIWaK h/uUub9/YEWjr+KeELy5S1lshmJ7R+vUVEw0vHQELUZRv/yHAAAa5hxv+TPVY6VElI78 UB9jZ59bYE59DGG5uxiSfaQDzgMpfkwQ1QwmbKfxv1KZ/PfTryjm5SOH5MKfXVVPe0CU qeV544g6INl6DOEE+baNk8Ywz9mzcL9/skryz7MuwloEgHR5t4ikX1jJ9aCV6nbOTQIW gINwotuloBlJV3ovaXx6+rgE/LtoQc6ZdnNb0AxppQEPFhdyQRRH4UBYNxvBIISmojNV H2TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="v6o/lhw3"; 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 d13si15990696qte.26.2021.06.30.11.44.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:44:52 -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="v6o/lhw3"; 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]:34398 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfCe-0005wh-4R for patch@linaro.org; Wed, 30 Jun 2021 14:44:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0u-0005ah-6m for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:44 -0400 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]:53865) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0s-00027D-FO for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:43 -0400 Received: by mail-pj1-x102c.google.com with SMTP id q91so2369871pjk.3 for ; Wed, 30 Jun 2021 11:32:42 -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=vJrlNdqM0KKCTgAnUoRaR9ScUOgl0wituQHo+qblcXE=; b=v6o/lhw3PU34Xvm8Pccrs5MLt15WbtDw7GYUvFr7cxPEKgfvk/6notSOJk+JTma6B0 MFlnQylLGFXmBmYqbE0oQFiC5cvjRgd3CKkn3XvcFMyBWfyyWMQ9yE2/MRnZKRq8AObp PVt22RuRABUbr//Gg/h+Hz4Vwmiy+P+sGRFtZmG0ufg+7eWISoRKsYKddb11o5T2s6K1 +JY/KXM/cMk2umIyDCA3UP+eXrwxQXMmUwWIh/Wone2E3XGHtFviJpEHef2z1/V/hk1E omr6mH6KMLbJ06bAzIL3Zxg9mtJvJlVY+PRZFa4SFaJfcA3EDNBblHWjlzV9fG4lU0ly MLfQ== 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=vJrlNdqM0KKCTgAnUoRaR9ScUOgl0wituQHo+qblcXE=; b=XykPN75MKZfXZutlmwoAS21RHdbEPJhu2NRQYvBsu4e+tlrQAEXQMW33dpr8EHIHyo nZWqTnnV5WnYpSddPKnXfr6dahbUEf6sSiVZ2Vy6bCmrdeEvJKJnjmz9qbyuYfaLzQbZ qGvGQjLIxcrQgYsufVhv99nSLQUvvUCVawceqYknFqc/02RO4hrY+nYnFViTuaL6HJxG YrwL9L7UpYKcOrKE+zlBVtbJsOeoy6JWPD9YCA4xHbs9AETpJAw0BLx/ae8wQntzaBiN f1ywrALdp3NzDhpolZFK1+7Pf824rPj3pwImzi9J6XDlS759oQCHwQOrs98cTCvB5iK8 6BIw== X-Gm-Message-State: AOAM530k46ZUise14/9vjCyCu/qxxtJOuEGoamUFBtdc6w4Kdztb43la nNe/9fU60GktQpOCTprhuLq0UVdx0puoPQ== X-Received: by 2002:a17:902:8206:b029:129:2e87:a86a with SMTP id x6-20020a1709028206b02901292e87a86amr204551pln.5.1625077961190; Wed, 30 Jun 2021 11:32:41 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:40 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 22/28] target/s390x: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:20 -0700 Message-Id: <20210630183226.3290849-23-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::102c; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102c.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: David Hildenbrand Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Cc: David Hildenbrand Signed-off-by: Richard Henderson --- target/s390x/translate.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) -- 2.25.1 Reviewed-by: David Hildenbrand diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 03dab9f350..117a890ecd 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -697,12 +697,7 @@ static bool use_goto_tb(DisasContext *s, uint64_t dest) if (unlikely(use_exit_tb(s))) { return false; } -#ifndef CONFIG_USER_ONLY - return (dest & TARGET_PAGE_MASK) == (s->base.tb->pc & TARGET_PAGE_MASK) || - (dest & TARGET_PAGE_MASK) == (s->base.pc_next & TARGET_PAGE_MASK); -#else - return true; -#endif + return translator_use_goto_tb(&s->base, dest); } static void account_noninline_branch(DisasContext *s, int cc_op) From patchwork Wed Jun 30 18:32:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468730 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp618812jao; Wed, 30 Jun 2021 11:49:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkppeIWwWEgezKViLj9QHqc3cudAhNxUd3EVkhaTh3x0PpdEKBtRVmvIQlCDbbHdq8ymzd X-Received: by 2002:a1f:cb05:: with SMTP id b5mr29225947vkg.9.1625078998989; Wed, 30 Jun 2021 11:49:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625078998; cv=none; d=google.com; s=arc-20160816; b=FqF/GXH/wM9m4ChWMeWUakiR6WY7QuvjlgB9+WEokAYazVuRDLUUFWPRbzcAeE5zBS slsXtcibltGud7vlkK5XZGRCjNOucvcBnJ650GpAA6hPpqps62t5yv9Eo8wyEnmkVcHF rKz6cXxsCXtSlFu5g5jYMUK04+ciQYdbxXmB/VtZ2sbWEmeQk2QFEiWOPKhj48lgiqBl 5GgN/md5DxEp1pObaPabjrrX8PSVVFUk4C5bTyKSxUO5Z8bn680SlTyd2PZc+kH9Qbyu zXn2cl10zc5w68KU+rEM/U+QUeAbJsULKRSqbqckjON8wEGnjwfozM3vb/SbQr72s7um uPTQ== 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=9rewGNkgTjS5g4OXefHXoaM3PsmWPITsUkhsWrEnLmU=; b=T/d++/2REUT4LXlY9F1haplt/CJxn3yy+rh/+WtQSZUl7UmxVGWpOw0Kuf3atUsClS 3YKFHQj5pnEXoHEoYN+ENydi26seXU0Qs7DUsssxQJ2J5kdS1J9dFz+wiLzJy9fniF/J Y5u4MBx6ApNrVlyt7TrsFNKlKeFMPXvhi4LOWPMLSsFXrEBNYd2ci1m9bpSfOg5cRTeZ 5BhnCHZCFvLCxEy+JGyDTZA/3Ku288MQFzwZLrQU3Ht3xRDLselTtWbdz2IXt3kAuA9w suP47fwFSOdkBQTjVqiHbueZ+6cxTxtptP521DpvIOZPnGMU9NNdqApA7Mp7LWpxu7R2 DRcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uK4HlgFg; 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 x75si14843793vsc.240.2021.06.30.11.49.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:49:58 -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=uK4HlgFg; 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]:46830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfHa-0005vx-BI for patch@linaro.org; Wed, 30 Jun 2021 14:49:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45670) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0v-0005dZ-0S for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:45 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]:34546) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0t-00027P-2q for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:44 -0400 Received: by mail-pg1-x530.google.com with SMTP id a7so3214536pga.1 for ; Wed, 30 Jun 2021 11:32:42 -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=9rewGNkgTjS5g4OXefHXoaM3PsmWPITsUkhsWrEnLmU=; b=uK4HlgFg76DHiAcOgJDyWgRGibhhWJBv6ccDe2cnqFzOjvCiQIPpZm3xUk2xDml5z9 9xYIvituBRhutIUexLuCHB/7glmyCXKCDLeEl7Q/koHwawLxz/chIrupZJqZywIM7cpP ajVytP2E+T21aQhhFVyS/Tm52QnHbg+4GXgvlbS4YvauclAm82E739aVXfga2uoy1IcH V0WdKoO7JFRrHCBeXxcrec3X6xZXPnt2GplAd17raA5Gj/g/My7Hjs+OBmriMPMsRldo Np54yru95EBcz5yfRhbuo9QyPuICu8KwhAz1mXUzQ2LyjOU/87R6wPIuaZWDXnLWOAqM 6PUg== 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=9rewGNkgTjS5g4OXefHXoaM3PsmWPITsUkhsWrEnLmU=; b=dpI2his0u+vhdXfVOSqm1G+RvKjeowsbb9IqwXnMKNx8k7B9OLa3poBNTWTR21gFQr eLNSJmVPuruNkiIQRYMy7IK5Q0XlJgHXRILlHeF5FqAZpEfCELRFzyBrjda3arMu+Cgd jk7u38WS4FH9PCmICiZKKCAEnTF8K12zOdWZgIXzhwnTCxsCUEP+82/AjBzu653/drQm ryvcSaSQo4/FrqR1sOiY7TNssc5Busz1fvthxmDTf2neNodCTM4UK/hnBfUzfsYCcTDa YYPi92nVYQDvAiBqgNzumP1vcrGvlOAEDcx5l1LXNwq1F2QoxZ73L1WgOyUOn96THTgC i5Uw== X-Gm-Message-State: AOAM531zdcN9CVPZYZjP3UU1T9uMtFgQhizoyAa08wot6zUU073hCLlB toLqPcA95n/4QgJhpv3+1vcoEZ2MZj4lQQ== X-Received: by 2002:a65:5302:: with SMTP id m2mr35137862pgq.187.1625077961723; Wed, 30 Jun 2021 11:32:41 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:41 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 23/28] target/s390x: Remove use_exit_tb Date: Wed, 30 Jun 2021 11:32:21 -0700 Message-Id: <20210630183226.3290849-24-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::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.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: David Hildenbrand 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"). In use_goto_tb, the check for singlestep_enabled is in the generic translator_use_goto_tb. In s390x_tr_tb_stop, the check for singlestep_enabled is in the preceeding do_debug test. Which leaves only FLAG_MASK_PER: fold that test alone into the two callers of use_exit tb. Cc: David Hildenbrand Signed-off-by: Richard Henderson --- target/s390x/translate.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) -- 2.25.1 Reviewed-by: David Hildenbrand diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 117a890ecd..4742f59ca9 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -685,16 +685,9 @@ static void gen_op_calc_cc(DisasContext *s) set_cc_static(s); } -static bool use_exit_tb(DisasContext *s) -{ - return s->base.singlestep_enabled || - (tb_cflags(s->base.tb) & CF_LAST_IO) || - (s->base.tb->flags & FLAG_MASK_PER); -} - static bool use_goto_tb(DisasContext *s, uint64_t dest) { - if (unlikely(use_exit_tb(s))) { + if (unlikely(s->base.tb->flags & FLAG_MASK_PER)) { return false; } return translator_use_goto_tb(&s->base, dest); @@ -6634,7 +6627,7 @@ static void s390x_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs) /* Exit the TB, either by raising a debug exception or by return. */ if (dc->do_debug) { gen_exception(EXCP_DEBUG); - } else if (use_exit_tb(dc) || + } else if ((dc->base.tb->flags & FLAG_MASK_PER) || dc->base.is_jmp == DISAS_PC_STALE_NOCHAIN) { tcg_gen_exit_tb(NULL, 0); } else { From patchwork Wed Jun 30 18:32:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468734 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp622293jao; Wed, 30 Jun 2021 11:55:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQts1izlOv3KhWpY+0mqRbbjjtEU5KHOJsodz5lE0H5OXK2CM/HONxgBTxNAqTqjNbKlbw X-Received: by 2002:a05:6102:3a70:: with SMTP id bf16mr34071776vsb.48.1625079309086; Wed, 30 Jun 2021 11:55:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625079309; cv=none; d=google.com; s=arc-20160816; b=tO0/AGt8+hucL55qqwPJ1vSZXCjks5a98GPKIdCT4bgorL/SmBpX9JqRkU6+EDozfD UXmbhXhNCn1jhoYltQZHjFX2fg2FngzaYyTe3qRedAoLKV5l4tGZY+/ppWPRHwQ1Bk+Q 15StUkMn3KgQflK6fNdnDyI6qcNNSu61JIMYJFICcNVZ3GEiVXaYPGknjTZISVcUCnxD gtw73gpP0KxOPe3wyP24BMbSYqP8RTh3Z4kPLUC7OhjYrb5Fb+NzTtNuFFS52jviiV7B 77UvlXo2SMpK8m0yXxWxGtFiUyEChtXR+qWxnpRFUm1iktjTF9YgySnO5/pKguRqTxF4 dzOQ== 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=tZb8axAgxZbtOE+ars3KbfwaNr5DhJbyVKuqHiiznqE=; b=bup9Nybf4nlDHdKvXKUmIEG2HetFk19tUZQ/htumUN0jDUj/T5Cp7mjtS9ZhbrscCl BwCImH6/iMv8MXwPF7vmHc8pBWc4saGaiUfie3svbNd4TDSC+n9U6vwbliJro4EsnU67 K4euTjNpjUfXn7M7HNjlj0Zvf3SWlOpYmUU6R+2cI+qMAAJohQMHg3+8Afv5PJLYsh+x HpYi/8V4q7vy1OW8hxsX7kgYrI9H3igJ8e9IPfJBgWP+yOfB888bbVJJADrJu7V5+1Up WuH6HWg5vQF3p24T+V0jXNjSQmSN3QD/R5oNEKzRP3JbJhIsoBGplCu4VHaKBR3ebs/E GRbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tVbqVrtY; 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 s1si395187vsq.182.2021.06.30.11.55.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:55: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=tVbqVrtY; 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]:60162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfMa-0006SK-F9 for patch@linaro.org; Wed, 30 Jun 2021 14:55:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0x-0005mw-Or for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:47 -0400 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:44730) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0t-00027q-GT for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:47 -0400 Received: by mail-pj1-x1033.google.com with SMTP id p4-20020a17090a9304b029016f3020d867so1983295pjo.3 for ; Wed, 30 Jun 2021 11:32:43 -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=tZb8axAgxZbtOE+ars3KbfwaNr5DhJbyVKuqHiiznqE=; b=tVbqVrtY1mBu1QNknzhbpNXI/qBDKp1UL3Zcw/zGPE5xe33gdOuyam9WrOp/Z0hd6l dnl9jJgR1I8PS6BLPlCPhNZ530m5UbdYAEFveo4QMHfWu/N2ptMZTXQhiM2I8iJzgLWq 7N8x45neH6euzRT6BND1MXMKeZkBHGH8udu34R5Tvg7dRk6gkv5Wrcl9luMveiLFoSgM T+iqT8hEVpK6sEn8ue/lPz7kg9b04mw6SDSmABK0pikq8OTPJcpxu1W4Ghuc8I5bWwtR I8vWW+raaVaKnSm8/f8G18q6WnSWsDDnuVWMi0fazNjehSq5gkhApdlxjr7xYS32WzkV y0OQ== 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=tZb8axAgxZbtOE+ars3KbfwaNr5DhJbyVKuqHiiznqE=; b=iEJZ1BAQrcX8NzFo7LwsIgPoCSh613Sp31MnDBwfzKRr3uLNYefHpdv1MZMWf+HrxJ zKxTNm99OJtDBasBVZQBPN0Z8/Ix9/YcAeG1phuaG6LaPpaSO7P+lrRmi9DCxT7pTKR2 rzgKWNiY84B8BdWn7klVcWrvpJAz7WhY+cOYPfEq1n1z34Bp3SoOCRyliczUrNVISgBm 84lW/coIQRkvlmB58BanAPi99n41hrTrURNHTvesu2w7d49pSf4D9yYRmey+zeH/rgPV hlLlBGvjOzsgmDmm9/+IOf6t8Hul0CjMtEPEqYm33cfHL6k6YS+cKzPqOdrN9Is4y3r0 XpLg== X-Gm-Message-State: AOAM532S9qBhmV1PH8mFreFqLfqRT/bl6/s33Oha1BtMx+aPVQceb3NL /y7mPMyOMIUCwztJbkeMPmIuwTds/wG0KQ== X-Received: by 2002:a17:902:eb44:b029:128:fbff:1e28 with SMTP id i4-20020a170902eb44b0290128fbff1e28mr9495402pli.66.1625077962192; Wed, 30 Jun 2021 11:32:42 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:42 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 24/28] target/sh4: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:22 -0700 Message-Id: <20210630183226.3290849-25-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::1033; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1033.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: Yoshinori Sato Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Cc: Yoshinori Sato Signed-off-by: Richard Henderson --- target/sh4/translate.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/target/sh4/translate.c b/target/sh4/translate.c index 4dcfff81f6..db09a0bce3 100644 --- a/target/sh4/translate.c +++ b/target/sh4/translate.c @@ -225,17 +225,12 @@ static inline bool use_exit_tb(DisasContext *ctx) return (ctx->tbflags & GUSA_EXCLUSIVE) != 0; } -static inline bool use_goto_tb(DisasContext *ctx, target_ulong dest) +static bool use_goto_tb(DisasContext *ctx, target_ulong dest) { - /* Use a direct jump if in same page and singlestep not enabled */ - if (unlikely(ctx->base.singlestep_enabled || use_exit_tb(ctx))) { + if (use_exit_tb(ctx)) { return false; } -#ifndef CONFIG_USER_ONLY - return (ctx->base.tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK); -#else - return true; -#endif + return translator_use_goto_tb(&ctx->base, dest); } static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) From patchwork Wed Jun 30 18:32:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468738 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp631321jao; Wed, 30 Jun 2021 12:06:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdwOD52kIjAx6Nu+XHpfG6Otxq4q0Ea9y7mBXo6cu7sj1GWDZ4u9AmRUrBSZtAVq291lFM X-Received: by 2002:a17:907:1ca4:: with SMTP id nb36mr6643527ejc.33.1625079965956; Wed, 30 Jun 2021 12:06:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625079965; cv=none; d=google.com; s=arc-20160816; b=mP2Bn5rRXkmlBnR+SCE68rWrrV7m9n2olqbFkn6RB01idlm1DHoPcb77e90VLKkX4B XZ0O8aDt58xLfgNioCadBcRa8EPMI0NonNeJkTRIg95G/ZTo+9DO919ESmtNT4ygRnxc 5dA0MOZZIO07eWpcvtSrsM0azdKhstGkGfMIwtmUyWbKsfwKFhg1S1iSHZtuAq8CpuNk WEYzh/KTkIK6yBaoeKvdOmBWbDA2Ies3iwJYpHFsask4BYlMsJQDRQ1IcAWVVgeoDaBw ufIYQRMqGO43pQwSC+HGa9Qhj7wUtPk6C4AJwKGiuUMUmmmVzQWZExK2slcsrh8SURUx CMKQ== 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=c5zdFypNJUiuz9mUBU1bW+MPnocbJgkyrT9X/Rkk3hE=; b=f3NkZKC/lCZ7D+hLb0MWqaCU+0q8T5vdHvYBkYmLmnJfp9eTmxJqJ5pVfDIINOi/Vd TOw9Dze7w9KQwW8FumRCx2MM0pYfdw9MgBr1iPDzEWncYU6dM7uwMTxwudYSgTikTIqO CuH5w+4C06QG3/JxMvN//RL/YFu//yKV6gOcwfr+xb05R8PY9SFUISsrLQm0R36UMrVo r7IP04VJoHhdS5nVjFamKIPoXbaH57ITuMZVrL0ka4i7l/qpS7e26wZO38UXK/Pb/2Q+ EAThnS6SHpIDaYaVw1H0F/FHSvGvr2zYCdADkWJpd9tPwQmu7A7tWlEymCIpMZb8CY++ /UpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XYko2A8D; 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 b10si23080838ejj.523.2021.06.30.12.06.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 12:06:05 -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=XYko2A8D; 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]:34330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfXA-0002IE-P0 for patch@linaro.org; Wed, 30 Jun 2021 15:06:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0w-0005io-HS for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:46 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:38706) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0u-00028q-27 for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:46 -0400 Received: by mail-pl1-x62e.google.com with SMTP id b1so1989115pls.5 for ; Wed, 30 Jun 2021 11:32:43 -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=c5zdFypNJUiuz9mUBU1bW+MPnocbJgkyrT9X/Rkk3hE=; b=XYko2A8DkdqNp2CiO+ckRPZLiXhFRfUQqPKHEgFO63Xlw06FTIJ3xKANnlwfsePULX V0iEViUIdfvBNa1uigszfYDVgaAgOqad+6uvSyv+XSODewWFKnWoPoBFCHB1APv1lsmX rjxpS5A+WAAv8LL7M537e1vEX7F57x2oUQVjCj4cyVddUPtwU5uuCyBcEO9aH90H1JwX iM+K69TIgrMuZO42Gs072r9JnudPEVvA1+h3AgEF3Qf2MRudjXXuPe66Dhi5g5DbvvEU B9+C9SYxxOiR+/Vnkz2NdQJvIGemf+Ltu1yNvubvBEAN+9PchMuRm+2m+WSjSKwdpkAJ kweg== 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=c5zdFypNJUiuz9mUBU1bW+MPnocbJgkyrT9X/Rkk3hE=; b=HCuTpjX/D+Th10S00uqfl7hhahXWjsPfBAtOWgXlLzntOWvPWskwaypRdlrXkE1scf IeRAMWbzA/xxj2m3ghmDENNX3ws88S7DHRRgCb9bxD6OQfQVX18m97aRp/PQ2/l33dPD G77yQ9OUjK8dQQr9pXpq+2w7W6HQjDxvbqodv+NbHx5Bl0pfttSV7Pdl71ECuZOSY8JO Qry2DI4CnWDiljWLlaoG+LdQxnN9RFq8z9ZY+TN5bfAaYIVHy2lHYm/6uXJUOy9s4EyF dgkSIeditNpwraeTErOxdTGMlSbHzT6Shak52LOSTjosyoFz7zzR4Oqz9dtE4qFLBxEV +HtA== X-Gm-Message-State: AOAM533dIpH80iAfQNbPoO2J+Xx4ng21ZtE9y3lRCnRiokLKy6h2Yu+x BIZHSv/Mk8awG5oQGiQ/DdHTP26/W0eCtQ== X-Received: by 2002:a17:90a:348e:: with SMTP id p14mr40143906pjb.151.1625077962723; Wed, 30 Jun 2021 11:32:42 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:42 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 25/28] target/sparc: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:23 -0700 Message-Id: <20210630183226.3290849-26-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::62e; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62e.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: Mark Cave-Ayland Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/translate.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) -- 2.25.1 diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 4bfa3179f8..fb0c242606 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -339,23 +339,14 @@ static inline TCGv gen_dest_gpr(DisasContext *dc, int reg) } } -static inline bool use_goto_tb(DisasContext *s, target_ulong pc, - target_ulong npc) +static bool use_goto_tb(DisasContext *s, target_ulong pc, target_ulong npc) { - if (unlikely(s->base.singlestep_enabled || singlestep)) { - return false; - } - -#ifndef CONFIG_USER_ONLY - return (pc & TARGET_PAGE_MASK) == (s->base.tb->pc & TARGET_PAGE_MASK) && - (npc & TARGET_PAGE_MASK) == (s->base.tb->pc & TARGET_PAGE_MASK); -#else - return true; -#endif + return translator_use_goto_tb(&s->base, pc) && + translator_use_goto_tb(&s->base, npc); } -static inline void gen_goto_tb(DisasContext *s, int tb_num, - target_ulong pc, target_ulong npc) +static void gen_goto_tb(DisasContext *s, int tb_num, + target_ulong pc, target_ulong npc) { if (use_goto_tb(s, pc, npc)) { /* jump to same page: we can use a direct jump */ From patchwork Wed Jun 30 18:32:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468727 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp617266jao; Wed, 30 Jun 2021 11:47:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycGyjV+jquilkJBlpf7zraXhVp6UvPz+pPAqpL99Q1U4mMXYq8K8tP9/W7jUIqcSzbCI+K X-Received: by 2002:a1f:1603:: with SMTP id 3mr29852907vkw.0.1625078859837; Wed, 30 Jun 2021 11:47:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625078859; cv=none; d=google.com; s=arc-20160816; b=BMl2W1QO8RFWEIa+5DslUrQI6gdGmySv3f72zQytyxzLUnBYb9mvusMXDz1B0lQSUA xwIQbBTe9/0vlKUjYwGe3vtxZewgHpmMgeG4f9+Sf8gqfXXYTEK+bnLsGEkcBpD3iJn7 qUr3jGov69HvwCWmPSAEuyZrHANYkOJSLCCu+wVbWl2BvCxAEkJY/EvtWrr2/ZNqL1XX Jo5h0xFCTlD/4t4/vsg31Qe+C5zzahPKh0MSEGuEPDsCBbN7d2iXRpfvUbGJS4ZSd1DL S5adPG4GCE7h75ycuUGSmCodwRTpjiSnkUEaKgBLBYkr8Iw/kaWbIk5heo/o/nicxwyy Tlbg== 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=HmrvZ2YDmFmQRowDiyGgkhSWbFuv8fekjQLGpsBU/NM=; b=DFyqW6X+0dnGNZbLZWcA9i3I7l1jNVW4vJdMUc9xW16o3TQnZQ4AhCx+hJc93mfOW8 qF+Ot/bbnFCZ0b99DhHcYQftPBpoGCVinlkJod6SCgHnwyHxsRHrRiwu/3sL7xixh5o7 67Fo9AJjM4KUJDHJlN7nRGEI82qcR5F/BplH5X2MT83i/ybXUUDbpOXy3jGs6ZkAj/sP 54q2OMYYCkg0sWDUZelKJYac38+fS06lX6eavZC9XUlcu1tiaW9Gv5DM5IdM7PH3+SeY Qzo9gqr4cZD6RUaqUxWM19F88FSKxhRPDkK68xrzVON0jBUUFJ5S4wRLrTZX2apZcB6z j79g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ekLix1XC; 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 x62si3267731vkd.84.2021.06.30.11.47.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:47:39 -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=ekLix1XC; 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]:43032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfFL-0003OD-7M for patch@linaro.org; Wed, 30 Jun 2021 14:47:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0w-0005iU-Eq for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:46 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]:44761) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0u-000295-Kh for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:46 -0400 Received: by mail-pf1-x435.google.com with SMTP id g21so3294057pfc.11 for ; Wed, 30 Jun 2021 11:32:44 -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=HmrvZ2YDmFmQRowDiyGgkhSWbFuv8fekjQLGpsBU/NM=; b=ekLix1XCLSvz6b8h7f8cx7/My6vueHR/trnQ/pu1a/YM14JF5iRUiL2iJxpF2Jsjn3 9/lstKSfp9+WNxVau8TVNPQx+haTrDQy6JQVXZnKEZikaUxlEkobfqvVXc9jt4OtQ9Yy 5uInSLRq5ua/AvsNbWd70cuBGcTz/OSytxFYu+H2OmzBd7yDxw6cG7F2nU8YntnL+zOy 0THvF+Clw7O4b3an0nI62pXfNNkA5mQ/YJBPb8qQzoxwjE9/U++2969znzO25h04/YEo U36iTwCjSuZ9X7kqmhJCFvwX8Pt3qNLFMpS4CaSNLOJCrTillFyLT/uj/rMIPLZ4Vzjb 0JAA== 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=HmrvZ2YDmFmQRowDiyGgkhSWbFuv8fekjQLGpsBU/NM=; b=hrW+DGr5r41RlKfFOO/cjwYJ3J3kWaX6zitn+us4ROjXUQmyA16BLsMQbkks/mZvdp UuM1mM9jA9iseWU0M5ObuWM7Kn7QZ3aNGP7aL4Hc4k+rxAsOGfPPMzG6oC7H13FspXdY +jkphn7hMTUJx4xkFg/I37aK4espJuiOmxa1WL8FdRJh2EL3w4x5EvYSmTMsFk68UWfq uWQSzbGuSTgqfa+lhggWWXqiGmv1OOI50ar4YZxNutZqI1tMs0Zb97Mdo2SxsWoqBneY HWhfYPqRxRbt7IrqWUydfu5rOtSRRM1cwPSKfVFBUFXBd0+wGMOPFqzx+rN9GYmmi7m/ lmIw== X-Gm-Message-State: AOAM5317gwqhtUA6z0y84ZXnPeuW8ma02ZnPdpWJOSrawSAabON4OOXV zHc81fq7UVON9OffQeeua3lGNvc/IbirnA== X-Received: by 2002:a63:3704:: with SMTP id e4mr34965806pga.310.1625077963390; Wed, 30 Jun 2021 11:32:43 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 26/28] target/tricore: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:24 -0700 Message-Id: <20210630183226.3290849-27-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::435; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x435.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: Bastian Koppelmann Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Reviewed-by: Bastian Koppelmann Signed-off-by: Richard Henderson --- target/tricore/translate.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) -- 2.25.1 diff --git a/target/tricore/translate.c b/target/tricore/translate.c index 2a814263de..09465ea013 100644 --- a/target/tricore/translate.c +++ b/target/tricore/translate.c @@ -3225,19 +3225,6 @@ static inline void gen_save_pc(target_ulong pc) tcg_gen_movi_tl(cpu_PC, pc); } -static inline bool use_goto_tb(DisasContext *ctx, target_ulong dest) -{ - if (unlikely(ctx->base.singlestep_enabled)) { - return false; - } - -#ifndef CONFIG_USER_ONLY - return (ctx->base.tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK); -#else - return true; -#endif -} - static void generate_qemu_excp(DisasContext *ctx, int excp) { TCGv_i32 tmp = tcg_const_i32(excp); @@ -3246,9 +3233,9 @@ static void generate_qemu_excp(DisasContext *ctx, int excp) tcg_temp_free(tmp); } -static inline void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) +static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) { - if (use_goto_tb(ctx, dest)) { + if (translator_use_goto_tb(&ctx->base, dest)) { tcg_gen_goto_tb(n); gen_save_pc(dest); tcg_gen_exit_tb(ctx->base.tb, n); From patchwork Wed Jun 30 18:32:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468731 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp619308jao; Wed, 30 Jun 2021 11:50:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEntybmKxY4K+A3HYQjZoePuI/s00vpbXQCTpFvcNDhgog8avWsyr3SbZY368vkucrJObC X-Received: by 2002:a25:1984:: with SMTP id 126mr46879475ybz.327.1625079045620; Wed, 30 Jun 2021 11:50:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625079045; cv=none; d=google.com; s=arc-20160816; b=tpZcnj9NrZ9Dh9dJ/4Nqh/wI61201qoRNVe2MwKckU/6LRt7lJcrwyjMhn3W2jIq5f 2ruH9vRAjI6u10d/lFOnUWSN74mKlx3IXsU8+6hsfGBN7pr2BMj8JbWIpnF1RxBy9J+e HfkU23+o2M5k/fV2ZDa4u+28fu6uPSoQ5ssi8qoQ1HyX2L1dzdXMtmcpL44rjaqOAx5p EL3lgULq2IaAWj4k2QXarRSfX9iXsL+NrgIecXhB5+QnQwxOpbP6OXQZ4emyej3os8hy +VHk+BrDq76FiDJX4SpO3B3x8nRKM+TUf4VqRLey2s04GWgStTdTnBGTeLaPW6RNe37U btOA== 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=jlb9t26eUmvNmKvxgmiWrSkxF75bfUaFnwmdpAxQL3Q=; b=sIDoDXMau8A1/u3Q6ZUeV6bPE3zZiyqP9fZUeQ6TT0Jw9BT+iFWJwrIuIdeRJT38Ld uYTvGNut9QLI/elzCcImg8AAHFgQgsiugYeeGdB3TunuzPADZqKCJI8BKCto1VaLizNx Czly8t6KojsXDii5DxNnhcauErVk/3zeb2d1eWKQXaf0SjWiBJBk9hp5FD2aL8Sae++j LVyPWryEvCZ5BZMbekHkh/NZG5vC/y4c6v5a8p88pZOAZBifOOQzgKxFi8XUJTWfgrV7 cLBVpflHZJemfHjggJbPmHpVc8z5EL6hae6mkLrL0nBYmqWPrPWqvVBAe8NTWSPNJU11 +5XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L4lRlSEe; 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 f5si20189773ybn.9.2021.06.30.11.50.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:50:45 -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=L4lRlSEe; 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]:51588 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfIL-0000fw-37 for patch@linaro.org; Wed, 30 Jun 2021 14:50:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0w-0005jr-Ro for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:46 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:40458) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0v-00029o-45 for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:46 -0400 Received: by mail-pf1-x42b.google.com with SMTP id j199so2861281pfd.7 for ; Wed, 30 Jun 2021 11:32:44 -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=jlb9t26eUmvNmKvxgmiWrSkxF75bfUaFnwmdpAxQL3Q=; b=L4lRlSEe6X0ottRlvlfQnD/R36Do/SSlKLZPvAT19Ij2hgqTPSABLLSRzK3fd34j4m 6Xfm5omQ2qXVDCpMcQd1xGLW2HJ3araka2ChbnlRLguW7tPGcaBMo9mGZswyTMxftFQ2 IEQIXVdorrJxO25XxNdiXsTT4IHUMxKPlj3TbCPmsSj/BGdLH7l1FTTnXrMQ9vOqJFIj 7o8HaGDDqFRUAu/LdbiOKr4wDR9C2reOEexdw/Qr12rTJobym51X4ScjG8tCwcpr3VfQ J/YLQsRWqSUC49M53ptYOilTOEJ9iaxH0ssWVu3K2C7rPxF4a3936Abck9C8kgr4WAvv 7Fqg== 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=jlb9t26eUmvNmKvxgmiWrSkxF75bfUaFnwmdpAxQL3Q=; b=IAtsFaMiuOQHVkcKW0lQc4Nmih7QdkkSK7meVgnN9/qC7gZSWGmyhVsoCsusEvhZx0 IqfKL4Sb6HtkxqIKTtJNNDbtdONWBlhPrm0QvetKMhVvf54G8LVz5fURBFa7NDO+uZOk 7f2OHSD6C4fc94Dw6zoTnBFIW9pRfF5tjYU//PAJZKS8UGPsZmT2LMJxMur91FtA0EES 8nqMCXYic64VnNs9Hr92qQgh+kNB0IPfArrYi0EE8nmcIL1+i5BW8/WTRe+3qUeRtDY7 6RTXZyUYnr5qh8YOa1cAGaEC2qnetQaJXigamQmgY/Hx0ioC1SyngmsPG+fMJ8wQFhZO zZ/Q== X-Gm-Message-State: AOAM531N4av5iuUl1cPiAV0lSD/JGyYE+VV6m+tfor/boqTSE2Fuw5Wu mu7PEVhIP2vmGwTdoUPhH/yE+6L92YC+ZQ== X-Received: by 2002:a63:5153:: with SMTP id r19mr35566567pgl.56.1625077963974; Wed, 30 Jun 2021 11:32:43 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 27/28] target/tricore: Use tcg_gen_lookup_and_goto_ptr Date: Wed, 30 Jun 2021 11:32:25 -0700 Message-Id: <20210630183226.3290849-28-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::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42b.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: Bastian Koppelmann Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The non-single-step case of gen_goto_tb may use tcg_gen_lookup_and_goto_ptr to indirectly chain. Reviewed-by: Bastian Koppelmann Signed-off-by: Richard Henderson --- target/tricore/translate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.25.1 diff --git a/target/tricore/translate.c b/target/tricore/translate.c index 09465ea013..865020754d 100644 --- a/target/tricore/translate.c +++ b/target/tricore/translate.c @@ -3243,8 +3243,9 @@ static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) gen_save_pc(dest); if (ctx->base.singlestep_enabled) { generate_qemu_excp(ctx, EXCP_DEBUG); + } else { + tcg_gen_lookup_and_goto_ptr(); } - tcg_gen_exit_tb(NULL, 0); } } From patchwork Wed Jun 30 18:32:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468739 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp632395jao; Wed, 30 Jun 2021 12:07:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqK9UIqcaglzVyDfajrrgyqQoeKiTGQIGhqSovlj8j6yEqxko+lNpm8q2TWFGp0eXM+zaF X-Received: by 2002:a17:907:2d0e:: with SMTP id gs14mr10005607ejc.49.1625080041891; Wed, 30 Jun 2021 12:07:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625080041; cv=none; d=google.com; s=arc-20160816; b=NlM9lLd5nFXLGJ1aQOrJ8t2EWMqHCfA/M3kAt/aKoi/1NPOA2JsXmd/T3pqh7fODK7 A5bZI6/GylvvadHc8x2C4XNlASeOG5Bm14Kc3GR9DLkXnqpI5Kwk1M6fjkHbIrClqeFw 7gfQDW5QIb6/lSuQR/FFy6OdrNSMpVS70Euk+I0lkAeYNNddPK+sH+sg893KdTbpKDTx zDw0OZAfA863tzSugZa88zv5etW7JMVmvl+UJtUI6eHiOD0pg5dIXox1C7eS09Xd3mj+ olyfZOzUoFQyW89RDxwtP+wSbk1gJtWxakDqdzeiyot8e4ykqDL5CNFekkV7wiUUqsCK sq9A== 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=cqL8ixXnHLBIypnyWYXJ3pbFSn+qRlXr9cZUpIRddvA=; b=eeUbYGaN517lUmZC8MWlzYv+F/cdbScVqI0OSNRYO+LP3hK6X/LAwVuXIy0CjxdthZ udpqbQQMh1doqlqV9nOMrtLnXxiTe0UkdrZmMhZOaLzmvRvxsInzIAeFOXj3k0Y42Bha Mm2jiV7+UlymlbDnh+QWbJpgzceDymEELBUQyVxDLXcN3h8u6HVNGqpD6I9RIFJ9467Z zbstrM4yDpuje7UbQm9QP2s4EHWVERwTPdT4au/xsXfNhxGeVL5tThVupeDZSePYFLMJ xqr+3Y5X1dheWbJe2TJhyI+zK47iFUOevgeuLkt/3SUBD1Rx7WQfSBRvVB3zcE+0ewDO D76w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ObSzCpHy; 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 r16si3303126eds.321.2021.06.30.12.07.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 12:07:21 -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=ObSzCpHy; 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]:38670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfYO-0005Gy-ST for patch@linaro.org; Wed, 30 Jun 2021 15:07:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0y-0005qS-Gl for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:48 -0400 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:37726) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0v-00029s-HA for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:48 -0400 Received: by mail-pg1-x534.google.com with SMTP id t9so3197431pgn.4 for ; Wed, 30 Jun 2021 11:32:45 -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=cqL8ixXnHLBIypnyWYXJ3pbFSn+qRlXr9cZUpIRddvA=; b=ObSzCpHyrnm35Af7BCQRjpEvH9s01TxtIfGkBkyZiT6dWfAaVYe/BzRKyNKZ5lLX0d +rfauUdWmbe95ZYzGSx7gBPCgQZ+dfKnMzLm1bAwKVYlrEO9kzMj0k3sN/4Bg3Qqb5xS Ow+qZwg0OsqZRBjvxWT+Sz7XZaFlDH9BiKJ0yW8RaB5N7EmY8sw907wajT8BAm2Gn52/ HJAOykLM3ScMCom9hn4luwucIwzpmf/TOzcMsCV53SpxnBdb/edZ0WHqJ4FVeAdGakdy La7KEMVWEyRD0bXOKIpraoYLZn6orU9u2FT2bEKyM1ydU6HtmJ905njA3NUwkXIIm2ET n4IA== 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=cqL8ixXnHLBIypnyWYXJ3pbFSn+qRlXr9cZUpIRddvA=; b=Ykgd1ppXCV7oOD7yJnwIesl00Ow/SP+cZL11aRhNY0eWav/RBm9D/a2U3hLTxOj7xh qW9OyqhjHUIQxx/s4PAZfUT6s/UbKVHTs97NrLMKTFBkDox2YwF44Ek35sPHezogCETi M/+o105sospLfSd593d8BCPj3fZ9YpDV2IhJ1ztm1zCMY8VpV93OpQqMMhI8rqz6m19v +5DmDnMamUv45QQezadsnSClcZjUMD2lZoMTK7SCFOg1yHSxvWbqM0g2BUJulQKc3lCT nAlzwHml6SxrrqkK2zoEyY143eAmXTUiYVREi9MwZcOSjih4lCGprabeD9MDCQhszVtw PJ4g== X-Gm-Message-State: AOAM533E2DeV8Cyh0zZ51PI7Utit0OOGfK4Ot3l/+QtdAlkhG1TQfbaY crOfMxtHH4wFieHmEwxIdLs7zoM+NejIpA== X-Received: by 2002:a63:4c5e:: with SMTP id m30mr35360683pgl.153.1625077964435; Wed, 30 Jun 2021 11:32:44 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:44 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 28/28] target/xtensa: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:26 -0700 Message-Id: <20210630183226.3290849-29-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::534; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x534.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: Max Filippov Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Max Filippov Signed-off-by: Richard Henderson --- target/xtensa/translate.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) -- 2.25.1 diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index 14028d307d..ac42f5efdc 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -406,11 +406,7 @@ static void gen_jump(DisasContext *dc, TCGv dest) static int adjust_jump_slot(DisasContext *dc, uint32_t dest, int slot) { - if (((dc->base.pc_first ^ dest) & TARGET_PAGE_MASK) != 0) { - return -1; - } else { - return slot; - } + return translator_use_goto_tb(&dc->base, dest) ? slot : -1; } static void gen_jumpi(DisasContext *dc, uint32_t dest, int slot)