summaryrefslogtreecommitdiffstats
path: root/include/exec
diff options
context:
space:
mode:
authorPeter Maydell2017-07-03 10:54:30 +0200
committerPeter Maydell2017-07-03 10:54:32 +0200
commitfd479c60f5766f7fb247ad146b9e3c33d03d2055 (patch)
tree726cf8a382384bed4ca5379ec1027c754b40b706 /include/exec
parentMerge remote-tracking branch 'remotes/famz/tags/block-pull-request' into staging (diff)
parenttcg: consistently access cpu->tb_jmp_cache atomically (diff)
downloadqemu-fd479c60f5766f7fb247ad146b9e3c33d03d2055.tar.gz
qemu-fd479c60f5766f7fb247ad146b9e3c33d03d2055.tar.xz
qemu-fd479c60f5766f7fb247ad146b9e3c33d03d2055.zip
Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20170603' into staging
Queued TCG patches # gpg: Signature made Fri 30 Jun 2017 20:03:53 BST # gpg: using RSA key 0xAD1270CC4DD0279B # gpg: Good signature from "Richard Henderson <rth7680@gmail.com>" # gpg: aka "Richard Henderson <rth@redhat.com>" # gpg: aka "Richard Henderson <rth@twiddle.net>" # Primary key fingerprint: 9CB1 8DDA F8E8 49AD 2AFC 16A4 AD12 70CC 4DD0 279B * remotes/rth/tags/pull-tcg-20170603: tcg: consistently access cpu->tb_jmp_cache atomically gen-icount: use tcg_ctx.tcg_env instead of cpu_env gen-icount: add missing inline to gen_tb_end Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/exec')
-rw-r--r--include/exec/gen-icount.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h
index 62d462e494..9b3cb14dfa 100644
--- a/include/exec/gen-icount.h
+++ b/include/exec/gen-icount.h
@@ -19,7 +19,7 @@ static inline void gen_tb_start(TranslationBlock *tb)
count = tcg_temp_new_i32();
}
- tcg_gen_ld_i32(count, cpu_env,
+ tcg_gen_ld_i32(count, tcg_ctx.tcg_env,
-ENV_OFFSET + offsetof(CPUState, icount_decr.u32));
if (tb->cflags & CF_USE_ICOUNT) {
@@ -37,14 +37,14 @@ static inline void gen_tb_start(TranslationBlock *tb)
tcg_gen_brcondi_i32(TCG_COND_LT, count, 0, exitreq_label);
if (tb->cflags & CF_USE_ICOUNT) {
- tcg_gen_st16_i32(count, cpu_env,
+ tcg_gen_st16_i32(count, tcg_ctx.tcg_env,
-ENV_OFFSET + offsetof(CPUState, icount_decr.u16.low));
}
tcg_temp_free_i32(count);
}
-static void gen_tb_end(TranslationBlock *tb, int num_insns)
+static inline void gen_tb_end(TranslationBlock *tb, int num_insns)
{
if (tb->cflags & CF_USE_ICOUNT) {
/* Update the num_insn immediate parameter now that we know
@@ -62,14 +62,16 @@ static void gen_tb_end(TranslationBlock *tb, int num_insns)
static inline void gen_io_start(void)
{
TCGv_i32 tmp = tcg_const_i32(1);
- tcg_gen_st_i32(tmp, cpu_env, -ENV_OFFSET + offsetof(CPUState, can_do_io));
+ tcg_gen_st_i32(tmp, tcg_ctx.tcg_env,
+ -ENV_OFFSET + offsetof(CPUState, can_do_io));
tcg_temp_free_i32(tmp);
}
static inline void gen_io_end(void)
{
TCGv_i32 tmp = tcg_const_i32(0);
- tcg_gen_st_i32(tmp, cpu_env, -ENV_OFFSET + offsetof(CPUState, can_do_io));
+ tcg_gen_st_i32(tmp, tcg_ctx.tcg_env,
+ -ENV_OFFSET + offsetof(CPUState, can_do_io));
tcg_temp_free_i32(tmp);
}