From: Wentong Wu <wentong.wu@intel.com>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, marex@denx.de, crwulff@gmail.com,
Wentong Wu <wentong.wu@intel.com>,
peter.maydell@linaro.org
Subject: [PATCH 2/3] target/nios2: in line the semantics of DISAS_UPDATE with other targets
Date: Mon, 29 Jun 2020 12:05:34 -0400 [thread overview]
Message-ID: <20200629160535.3910-2-wentong.wu@intel.com> (raw)
In-Reply-To: <20200629160535.3910-1-wentong.wu@intel.com>
In line the semantics of DISAS_UPDATE on nios2 target with other targets
which is to explicitly write the PC back into the cpu state before doing
a tcg_gen_exit_tb().
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
---
target/nios2/translate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/nios2/translate.c b/target/nios2/translate.c
index b052be85..83c10eb2 100644
--- a/target/nios2/translate.c
+++ b/target/nios2/translate.c
@@ -865,6 +865,7 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_insns)
/* Indicate where the next block should start */
switch (dc->is_jmp) {
case DISAS_NEXT:
+ case DISAS_UPDATE:
/* Save the current PC back into the CPU register */
tcg_gen_movi_tl(cpu_R[R_PC], dc->pc);
tcg_gen_exit_tb(NULL, 0);
@@ -872,7 +873,6 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_insns)
default:
case DISAS_JUMP:
- case DISAS_UPDATE:
/* The jump will already have updated the PC register */
tcg_gen_exit_tb(NULL, 0);
break;
--
2.21.3
next prev parent reply other threads:[~2020-06-29 8:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-29 16:05 [PATCH 1/3] target/nios2: add DISAS_NORETURN case for nothing more to generate Wentong Wu
2020-06-29 16:05 ` Wentong Wu [this message]
2020-07-02 18:14 ` [PATCH 2/3] target/nios2: in line the semantics of DISAS_UPDATE with other targets Richard Henderson
2020-07-02 18:25 ` Richard Henderson
2020-06-29 16:05 ` [PATCH 3/3] target/nios2: Use gen_io_start around wrctl instruction Wentong Wu
2020-07-01 13:26 ` Wu, Wentong
2020-07-02 18:53 ` Richard Henderson
2020-07-03 13:22 ` Wu, Wentong
2020-07-05 13:22 ` Wu, Wentong
2020-07-05 13:24 ` Wu, Wentong
2020-07-05 17:08 ` Peter Maydell
2020-07-05 18:16 ` Max Filippov
2020-07-05 20:53 ` Max Filippov
2020-07-06 8:55 ` Peter Maydell
2020-07-06 0:56 ` Wu, Wentong
2020-07-03 15:14 ` Wu, Wentong
2020-07-05 17:10 ` Peter Maydell
2020-07-06 0:30 ` Wu, Wentong
2020-07-07 2:41 ` Wu, Wentong
2020-07-02 18:12 ` [PATCH 1/3] target/nios2: add DISAS_NORETURN case for nothing more to generate Richard Henderson
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=20200629160535.3910-2-wentong.wu@intel.com \
--to=wentong.wu@intel.com \
--cc=crwulff@gmail.com \
--cc=marex@denx.de \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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).