From nobody Sat Feb 7 15:43:33 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1536112315416680.8619607859387; Tue, 4 Sep 2018 18:51:55 -0700 (PDT) Received: from localhost ([::1]:53414 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fxMz4-00057o-CV for importer@patchew.org; Tue, 04 Sep 2018 21:51:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58036) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fxMsM-0006Ds-58 for qemu-devel@nongnu.org; Tue, 04 Sep 2018 21:44:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fxMsL-0007Ek-8d for qemu-devel@nongnu.org; Tue, 04 Sep 2018 21:44:57 -0400 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]:41030) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fxMsJ-00072A-2Z for qemu-devel@nongnu.org; Tue, 04 Sep 2018 21:44:55 -0400 Received: by mail-lj1-x241.google.com with SMTP id y17-v6so4801469ljy.8 for ; Tue, 04 Sep 2018 18:44:47 -0700 (PDT) Received: from octofox.cadence.com (jcmvbkbc-1-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:1fa::2]) by smtp.gmail.com with ESMTPSA id g10-v6sm59337lfl.11.2018.09.04.18.44.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Sep 2018 18:44:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qN+QFi7OQYbFmHuO8D9FuKtMjRgEstIp0Bdy1o8/h+0=; b=bzd5+Tx2WnFx59C+3uHD0R5vltMC32MeoUT9CPvLqHwecXzwzAdf+AILEPMfXKb/Rt 3AfpLLJtDl6FclAsHA3XP+lXj1aGCI2H0wgTEjiiHSOWJMHCmJLVzpvhCa2fworRuThl DffP/XxKMfppBE+PjCsNdojaJg0xVyKpgMZRifp8PawVphnIVHF7/jbMfjXkR/hj+yNw XPtoTawhtogwx50yHHW9zqHa3hLzuRNaa/TvccxYh8AeLjLgSP1kKDRxJTwvXaVIOKIL VJlwzXxwRREnQyxC0nLf0c5bBaHA8VGG69IBM5heImt+6u0iWFxmSjbjyC7vaIA5BQZN zAzw== 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; bh=qN+QFi7OQYbFmHuO8D9FuKtMjRgEstIp0Bdy1o8/h+0=; b=twD/3ATnAPuVhWQAtmnCDROKUmbR7CaMf2r546rikC1RcZ1gJV7nu8ZIHlBFPwGKC8 A0AqGcjPYtw+i+4URI4dxYa7NnZ3Rr5RlA8xoRy2NA9zHAcfpy2ixAskX2OrqyLGvS+B yVdfnqu41IO8QLNZlotrZBNJU+iWRDbJX50n9ACuTppxZOpWKX9OnDZ1/o29wMfDaZUM /76CsbtZzsplmZjtrMJdVwdpoEpAJqnKhk6qPEjWZB0kdRFDb1wngQaHOw89E6pH9W30 izrjJYOe+ULwkWF4HBoBCGFUjFPC73CMlgJf2d3YHV3dPMNselGF3CdrHoVhoDABAXju 1F1A== X-Gm-Message-State: APzg51D8YZC6+EVk8nnophpnsXXIjLxB+q9yyEX4uoOnhttE2K0jsTII uTI3yBQtyE7ANNpvEERIPJbeNsy+uBY= X-Google-Smtp-Source: ANB0VdaB3eb/3ZSdVj9e9d38CDsGtNPOBVSXk+Pdmx/kk4z6YGCLgswv5hxbnCTWIsnRTz00cGTVug== X-Received: by 2002:a2e:8:: with SMTP id 8-v6mr22062631lja.112.1536111886340; Tue, 04 Sep 2018 18:44:46 -0700 (PDT) From: Max Filippov To: qemu-devel@nongnu.org Date: Tue, 4 Sep 2018 18:43:49 -0700 Message-Id: <20180905014352.970-13-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180905014352.970-1-jcmvbkbc@gmail.com> References: <20180905014352.970-1-jcmvbkbc@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::241 Subject: [Qemu-devel] [PATCH 12/15] target/xtensa: always end TB on CCOUNT access/CCOMPARE write X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Max Filippov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Currently we only end TB in icount mode, because access to CCOUNT or write to CCOMPARE are IO operations. Simplify the behaviour a bit and end TB unconditionally. Signed-off-by: Max Filippov --- target/xtensa/translate.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index 0af3f1b16792..028b4d4c8652 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -505,9 +505,8 @@ static bool gen_rsr_ccount(DisasContext *dc, TCGv_i32 d= , uint32_t sr) tcg_gen_mov_i32(d, cpu_SR[sr]); if (tb_cflags(dc->base.tb) & CF_USE_ICOUNT) { gen_io_end(); - return true; } - return false; + return true; } =20 static bool gen_rsr_ptevaddr(DisasContext *dc, TCGv_i32 d, uint32_t sr) @@ -735,10 +734,9 @@ static bool gen_wsr_ccount(DisasContext *dc, uint32_t = sr, TCGv_i32 v) gen_helper_wsr_ccount(cpu_env, v); if (tb_cflags(dc->base.tb) & CF_USE_ICOUNT) { gen_io_end(); - gen_jumpi_check_loop_end(dc, 0); - return true; } - return false; + gen_jumpi_check_loop_end(dc, 0); + return true; } =20 static bool gen_wsr_icount(DisasContext *dc, uint32_t sr, TCGv_i32 v) @@ -773,10 +771,9 @@ static bool gen_wsr_ccompare(DisasContext *dc, uint32_= t sr, TCGv_i32 v) tcg_temp_free(tmp); if (tb_cflags(dc->base.tb) & CF_USE_ICOUNT) { gen_io_end(); - gen_jumpi_check_loop_end(dc, 0); - return true; } - return false; + gen_jumpi_check_loop_end(dc, 0); + return true; } #else static void gen_check_interrupts(DisasContext *dc) --=20 2.11.0