From patchwork Wed Sep 5 01:43:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 10588169 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 71A03920 for ; Wed, 5 Sep 2018 01:51:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6444A29CF2 for ; Wed, 5 Sep 2018 01:51:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 589C629CFF; Wed, 5 Sep 2018 01:51:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.3 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EA06F29CF2 for ; Wed, 5 Sep 2018 01:51:28 +0000 (UTC) Received: from localhost ([::1]:53414 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fxMyd-00057o-KQ for patchwork-qemu-devel@patchwork.kernel.org; Tue, 04 Sep 2018 21:51:27 -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) 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) 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) 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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; } 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; } 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)