From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru> Subject: [PULL for-6.0 2/2] target/alpha: fix icount handling for timer instructions Date: Mon, 5 Apr 2021 07:40:17 -0700 [thread overview] Message-ID: <20210405144017.20193-3-richard.henderson@linaro.org> (raw) In-Reply-To: <20210405144017.20193-1-richard.henderson@linaro.org> From: Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru> This patch handles icount mode for timer read/write instructions, because it is required to call gen_io_start in such cases. Signed-off-by: Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <161700373035.1135822.16451510827008616793.stgit@pasha-ThinkPad-X280> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/alpha/translate.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index a02b4e70b7..f454adea5e 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -1330,7 +1330,7 @@ static DisasJumpType gen_mfpr(DisasContext *ctx, TCGv va, int regno) case 249: /* VMTIME */ helper = gen_helper_get_vmtime; do_helper: - if (icount_enabled()) { + if (tb_cflags(ctx->base.tb) & CF_USE_ICOUNT) { gen_io_start(); helper(va); return DISAS_PC_STALE; @@ -1366,6 +1366,7 @@ static DisasJumpType gen_mfpr(DisasContext *ctx, TCGv va, int regno) static DisasJumpType gen_mtpr(DisasContext *ctx, TCGv vb, int regno) { int data; + DisasJumpType ret = DISAS_NEXT; switch (regno) { case 255: @@ -1395,6 +1396,10 @@ static DisasJumpType gen_mtpr(DisasContext *ctx, TCGv vb, int regno) case 251: /* ALARM */ + if (tb_cflags(ctx->base.tb) & CF_USE_ICOUNT) { + gen_io_start(); + ret = DISAS_PC_STALE; + } gen_helper_set_alarm(cpu_env, vb); break; @@ -1434,7 +1439,7 @@ static DisasJumpType gen_mtpr(DisasContext *ctx, TCGv vb, int regno) break; } - return DISAS_NEXT; + return ret; } #endif /* !USER_ONLY*/ -- 2.25.1
next prev parent reply other threads:[~2021-04-05 15:17 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-05 14:40 [PULL for-6.0 0/2] tcg patch queue Richard Henderson 2021-04-05 14:40 ` [PULL for-6.0 1/2] tcg/mips: Fix SoftTLB comparison on mips backend Richard Henderson 2021-04-05 14:40 ` Richard Henderson [this message] 2021-04-05 21:14 ` [PULL for-6.0 0/2] tcg patch queue Peter Maydell
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=20210405144017.20193-3-richard.henderson@linaro.org \ --to=richard.henderson@linaro.org \ --cc=pavel.dovgalyuk@ispras.ru \ --cc=peter.maydell@linaro.org \ --cc=qemu-devel@nongnu.org \ --subject='Re: [PULL for-6.0 2/2] target/alpha: fix icount handling for timer instructions' \ /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
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).