From: Max Filippov <jcmvbkbc@gmail.com>
To: qemu-devel@nongnu.org
Cc: Max Filippov <jcmvbkbc@gmail.com>
Subject: [Qemu-devel] [PATCH 12/15] target/xtensa: always end TB on CCOUNT access/CCOMPARE write
Date: Tue, 4 Sep 2018 18:43:49 -0700 [thread overview]
Message-ID: <20180905014352.970-13-jcmvbkbc@gmail.com> (raw)
In-Reply-To: <20180905014352.970-1-jcmvbkbc@gmail.com>
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 <jcmvbkbc@gmail.com>
---
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)
--
2.11.0
next prev parent reply other threads:[~2018-09-05 1:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-05 1:43 [Qemu-devel] [PATCH 00/15] target/xtensa: preparation for FLIX support Max Filippov
2018-09-05 1:43 ` [Qemu-devel] [PATCH 01/15] target/xtensa: extract test for an illegal instruction Max Filippov
2018-09-05 1:43 ` [Qemu-devel] [PATCH 02/15] target/xtensa: extract test for privileged instruction Max Filippov
2018-09-05 1:43 ` [Qemu-devel] [PATCH 03/15] target/xtensa: extract test for syscall instruction Max Filippov
2018-09-05 1:43 ` [Qemu-devel] [PATCH 04/15] target/xtensa: extract test for debug exception Max Filippov
2018-09-05 1:43 ` [Qemu-devel] [PATCH 05/15] target/xtensa: extract test for window overflow exception Max Filippov
2018-09-05 1:43 ` [Qemu-devel] [PATCH 06/15] target/xtensa: extract test for window underflow exception Max Filippov
2018-09-05 1:43 ` [Qemu-devel] [PATCH 07/15] target/xtensa: extract test for alloca exception Max Filippov
2018-09-05 1:43 ` [Qemu-devel] [PATCH 08/15] target/xtensa: extract test for cpdisabled exception Max Filippov
2018-09-05 1:43 ` [Qemu-devel] [PATCH 09/15] target/xtensa: extract test for division by zero Max Filippov
2018-09-05 1:43 ` [Qemu-devel] [PATCH 10/15] target/xtensa: extract unconditional TB termination Max Filippov
2018-09-05 1:43 ` [Qemu-devel] [PATCH 11/15] target/xtensa: change SR number checks to assertions Max Filippov
2018-09-05 1:43 ` Max Filippov [this message]
2018-09-05 1:43 ` [Qemu-devel] [PATCH 13/15] target/xtensa: extract unconditional TB termination via slot 0 Max Filippov
2018-09-05 1:43 ` [Qemu-devel] [PATCH 14/15] target/xtensa: make rsr/wsr helpers return void Max Filippov
2018-09-05 1:43 ` [Qemu-devel] [PATCH 15/15] target/xtensa: extract gen_check_interrupts call Max Filippov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180905014352.970-13-jcmvbkbc@gmail.com \
--to=jcmvbkbc@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).