From: "Alex Bennée" <alex.bennee@linaro.org>
To: peter.maydell@linaro.org, rth@twiddle.net, cota@braap.org
Cc: qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>,
"open list:ARM" <qemu-arm@nongnu.org>
Subject: [Qemu-devel] [PATCH v3 2/6] target/arm/translate: make DISAS_UPDATE match declared semantics
Date: Tue, 11 Jul 2017 18:59:33 +0100 [thread overview]
Message-ID: <20170711175937.23140-3-alex.bennee@linaro.org> (raw)
In-Reply-To: <20170711175937.23140-1-alex.bennee@linaro.org>
DISAS_UPDATE should be used when the wider CPU state other than just
the PC has been updated and we should therefor exit the TCG runtime
and return to the main execution loop rather assuming DISAS_JUMP would
do that.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
---
target/arm/translate-a64.c | 14 +++++++-------
target/arm/translate.c | 6 +++---
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
index e55547d95d..66139b6046 100644
--- a/target/arm/translate-a64.c
+++ b/target/arm/translate-a64.c
@@ -11364,16 +11364,9 @@ void gen_intermediate_code_a64(ARMCPU *cpu, TranslationBlock *tb)
case DISAS_NEXT:
gen_goto_tb(dc, 1, dc->pc);
break;
- default:
- case DISAS_UPDATE:
- gen_a64_set_pc_im(dc->pc);
- /* fall through */
case DISAS_JUMP:
tcg_gen_lookup_and_goto_ptr(cpu_pc);
break;
- case DISAS_EXIT:
- tcg_gen_exit_tb(0);
- break;
case DISAS_TB_JUMP:
case DISAS_EXC:
case DISAS_SWI:
@@ -11397,6 +11390,13 @@ void gen_intermediate_code_a64(ARMCPU *cpu, TranslationBlock *tb)
*/
tcg_gen_exit_tb(0);
break;
+ case DISAS_UPDATE:
+ gen_a64_set_pc_im(dc->pc);
+ /* fall through */
+ case DISAS_EXIT:
+ default:
+ tcg_gen_exit_tb(0);
+ break;
}
}
diff --git a/target/arm/translate.c b/target/arm/translate.c
index 0862f9e4aa..5f2cea8641 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -12095,12 +12095,12 @@ void gen_intermediate_code(CPUARMState *env, TranslationBlock *tb)
case DISAS_NEXT:
gen_goto_tb(dc, 1, dc->pc);
break;
- case DISAS_UPDATE:
- gen_set_pc_im(dc, dc->pc);
- /* fall through */
case DISAS_JUMP:
gen_goto_ptr();
break;
+ case DISAS_UPDATE:
+ gen_set_pc_im(dc, dc->pc);
+ /* fall through */
default:
/* indicate that the hash table must be used to find the next TB */
tcg_gen_exit_tb(0);
--
2.13.0
next prev parent reply other threads:[~2017-07-11 17:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-11 17:59 [Qemu-devel] [PATCH v3 0/6] arm: fixes for eret, isb and DISAS_UPDATE handling Alex Bennée
2017-07-11 17:59 ` [Qemu-devel] [PATCH v3 1/6] include/exec/exec-all: document common exit conditions Alex Bennée
2017-07-11 18:17 ` Richard Henderson
2017-07-18 0:02 ` Emilio G. Cota
2017-07-11 17:59 ` Alex Bennée [this message]
2017-07-18 0:07 ` [Qemu-devel] [PATCH v3 2/6] target/arm/translate: make DISAS_UPDATE match declared semantics Emilio G. Cota
2017-07-11 17:59 ` [Qemu-devel] [PATCH v3 3/6] target/arm/translate.h: expand comment on DISAS_EXIT Alex Bennée
2017-07-18 0:08 ` Emilio G. Cota
2017-07-11 17:59 ` [Qemu-devel] [PATCH v3 4/6] target/arm/translate: ensure gen_goto_tb sets exit flags Alex Bennée
2017-07-11 18:16 ` Richard Henderson
2017-07-11 19:20 ` Alex Bennée
2017-07-11 21:08 ` Richard Henderson
2017-07-11 17:59 ` [Qemu-devel] [PATCH v3 5/6] target/arm: use gen_goto_tb for ISB handling Alex Bennée
2017-07-11 18:17 ` Richard Henderson
2017-07-18 0:11 ` Emilio G. Cota
2017-07-11 17:59 ` [Qemu-devel] [PATCH v3 6/6] target/arm: use DISAS_EXIT for eret handling Alex Bennée
2017-07-18 0:14 ` Emilio G. Cota
2017-07-11 18:18 ` [Qemu-devel] [PATCH v3 0/6] arm: fixes for eret, isb and DISAS_UPDATE handling 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=20170711175937.23140-3-alex.bennee@linaro.org \
--to=alex.bennee@linaro.org \
--cc=cota@braap.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).