From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org,
Sagar Karandikar <sagark@eecs.berkeley.edu>,
David Hildenbrand <david@redhat.com>,
Palmer Dabbelt <palmer@sifive.com>,
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
Max Filippov <jcmvbkbc@gmail.com>, Michael Clark <mjc@sifive.com>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
Guan Xuetao <gxt@mprc.pku.edu.cn>,
Yongbok Kim <yongbok.kim@mips.com>,
Alexander Graf <agraf@suse.de>, "Emilio G. Cota" <cota@braap.org>,
Richard Henderson <rth@twiddle.net>,
Artyom Tarasenko <atar4qemu@gmail.com>,
Eduardo Habkost <ehabkost@redhat.com>,
qemu-s390x@nongnu.org, qemu-arm@nongnu.org,
Stafford Horne <shorne@gmail.com>,
David Gibson <david@gibson.dropbear.id.au>,
Peter Crosthwaite <crosthwaite.peter@gmail.com>,
Bastian Koppelmann <kbastian@mail.uni-paderborn.de>,
Cornelia Huck <cohuck@redhat.com>,
Michael Walle <michael@walle.cc>,
qemu-ppc@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
Aurelien Jarno <aurelien@aurel32.net>
Subject: [Qemu-devel] [PULL 16/28] target/mips: use lookup_and_goto_ptr on BS_STOP
Date: Wed, 9 May 2018 10:54:46 -0700 [thread overview]
Message-ID: <20180509175458.15642-17-richard.henderson@linaro.org> (raw)
In-Reply-To: <20180509175458.15642-1-richard.henderson@linaro.org>
From: "Emilio G. Cota" <cota@braap.org>
The TB after BS_STOP is not fixed (e.g. helper_mtc0_hwrena
changes hflags, which ends up changing the TB flags via
cpu_get_tb_cpu_state). This requires a full lookup (i.e.
with flags) via lookup_and_goto_ptr instead of gen_goto_tb,
since the latter only looks at the PC for in-page goto's. Fix it.
Reported-by: Richard Henderson <richard.henderson@linaro.org>
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/mips/translate.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/mips/translate.c b/target/mips/translate.c
index d8e717dacf..69137d0b3f 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -20343,7 +20343,8 @@ void gen_intermediate_code(CPUState *cs, struct TranslationBlock *tb)
} else {
switch (ctx.bstate) {
case BS_STOP:
- gen_goto_tb(&ctx, 0, ctx.pc);
+ gen_save_pc(ctx.pc);
+ tcg_gen_lookup_and_goto_ptr();
break;
case BS_NONE:
save_cpu_state(&ctx, 0);
--
2.17.0
next prev parent reply other threads:[~2018-05-09 18:12 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-09 17:54 [Qemu-arm] [PULL 00/28] Bulk target patches Richard Henderson
2018-05-09 17:54 ` [Qemu-devel] [PULL 01/28] target/riscv: avoid integer overflow in next_page PC check Richard Henderson
2018-05-09 17:54 ` [Qemu-arm] [PULL 02/28] target/cris: " Richard Henderson
2018-05-09 17:54 ` [Qemu-devel] [PULL 03/28] target/lm32: " Richard Henderson
2018-05-09 17:54 ` [Qemu-arm] [PULL 04/28] target/xtensa: " Richard Henderson
2018-05-09 17:54 ` [Qemu-arm] [PULL 05/28] target/unicore32: " Richard Henderson
2018-05-09 17:54 ` [Qemu-arm] [PULL 06/28] target/tilegx: " Richard Henderson
2018-05-09 17:54 ` [Qemu-arm] [PULL 07/28] target/microblaze: " Richard Henderson
2018-05-09 17:54 ` [Qemu-arm] [PULL 08/28] target/arm: " Richard Henderson
2018-05-09 17:54 ` [Qemu-devel] [PULL 09/28] target/s390x: " Richard Henderson
2018-05-09 17:54 ` [Qemu-arm] [PULL 10/28] target/mips: " Richard Henderson
2018-05-09 17:54 ` [Qemu-devel] [PULL 11/28] translator: merge max_insns into DisasContextBase Richard Henderson
2018-05-09 17:54 ` [Qemu-devel] [PULL 12/28] target/sh4: convert to TranslatorOps Richard Henderson
2018-05-09 17:54 ` [Qemu-devel] [PULL 13/28] target/sparc: convert to DisasJumpType Richard Henderson
2018-05-09 17:54 ` [Qemu-arm] [PULL 14/28] target/sparc: convert to DisasContextBase Richard Henderson
2018-05-09 17:54 ` [Qemu-arm] [PULL 15/28] target/sparc: convert to TranslatorOps Richard Henderson
2018-05-09 17:54 ` Richard Henderson [this message]
2018-05-09 17:54 ` [Qemu-devel] [PULL 17/28] target/mips: convert to DisasJumpType Richard Henderson
2018-05-09 17:54 ` [Qemu-devel] [PULL 18/28] target/mips: convert to DisasContextBase Richard Henderson
2018-05-09 17:54 ` [Qemu-arm] [PULL 19/28] target/mips: use *ctx for DisasContext Richard Henderson
2018-05-09 17:54 ` [Qemu-devel] [PULL 20/28] target/mips: convert to TranslatorOps Richard Henderson
2018-05-09 17:54 ` [Qemu-devel] [PULL 21/28] target/s390x: convert to DisasJumpType Richard Henderson
2018-05-09 17:54 ` [Qemu-arm] [PULL 22/28] target/s390x: convert to DisasContextBase Richard Henderson
2018-05-09 17:54 ` [Qemu-devel] [PULL 23/28] target/s390x: convert to TranslatorOps Richard Henderson
2018-05-09 17:54 ` [Qemu-devel] [PULL 24/28] target/openrisc: convert to DisasContextBase Richard Henderson
2018-05-09 17:54 ` [Qemu-arm] [PULL 25/28] target/openrisc: convert to TranslatorOps Richard Henderson
2018-05-09 17:54 ` [Qemu-arm] [PULL 26/28] target/riscv: convert to DisasJumpType Richard Henderson
2018-05-09 17:54 ` [Qemu-devel] [PULL 27/28] target/riscv: convert to DisasContextBase Richard Henderson
2018-05-09 17:54 ` [Qemu-devel] [PULL 28/28] target/riscv: convert to TranslatorOps Richard Henderson
2018-05-11 16:30 ` [Qemu-arm] [PULL 00/28] Bulk target patches 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=20180509175458.15642-17-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=agraf@suse.de \
--cc=atar4qemu@gmail.com \
--cc=aurelien@aurel32.net \
--cc=cohuck@redhat.com \
--cc=cota@braap.org \
--cc=crosthwaite.peter@gmail.com \
--cc=david@gibson.dropbear.id.au \
--cc=david@redhat.com \
--cc=edgar.iglesias@gmail.com \
--cc=ehabkost@redhat.com \
--cc=gxt@mprc.pku.edu.cn \
--cc=jcmvbkbc@gmail.com \
--cc=kbastian@mail.uni-paderborn.de \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=michael@walle.cc \
--cc=mjc@sifive.com \
--cc=palmer@sifive.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=rth@twiddle.net \
--cc=sagark@eecs.berkeley.edu \
--cc=shorne@gmail.com \
--cc=yongbok.kim@mips.com \
/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).