aboutsummaryrefslogtreecommitdiff
path: root/target/s390x
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-07-12 11:02:38 +0100
committerPeter Maydell <peter.maydell@linaro.org>2021-07-12 11:02:39 +0100
commitbd38ae26cea0d1d6a97f930248df149204c210a2 (patch)
tree88e13c944344969970bd1f0dfb1cab2a7a2849ee /target/s390x
parentd1987c8114921eb30859854de664f879b5626da7 (diff)
parentad1a706f386c2281adb0b09257d892735e405834 (diff)
downloadqemu-bd38ae26cea0d1d6a97f930248df149204c210a2.zip
qemu-bd38ae26cea0d1d6a97f930248df149204c210a2.tar.gz
qemu-bd38ae26cea0d1d6a97f930248df149204c210a2.tar.bz2
Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210710' into staging
Add translator_use_goto_tb. Cleanups in prep of breakpoint fixes. Misc fixes. # gpg: Signature made Sat 10 Jul 2021 16:29:14 BST # gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F # gpg: issuer "richard.henderson@linaro.org" # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full] # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F * remotes/rth-gitlab/tags/pull-tcg-20210710: (41 commits) cpu: Add breakpoint tracepoints tcg: Remove TCG_TARGET_HAS_goto_ptr accel/tcg: Log tb->cflags with -d exec accel/tcg: Split out log_cpu_exec accel/tcg: Move tb_lookup to cpu-exec.c accel/tcg: Move helper_lookup_tb_ptr to cpu-exec.c target/i386: Use cpu_breakpoint_test in breakpoint_handler tcg: Fix prologue disassembly target/xtensa: Use translator_use_goto_tb target/tricore: Use tcg_gen_lookup_and_goto_ptr target/tricore: Use translator_use_goto_tb target/sparc: Use translator_use_goto_tb target/sh4: Use translator_use_goto_tb target/s390x: Remove use_exit_tb target/s390x: Use translator_use_goto_tb target/rx: Use translator_use_goto_tb target/riscv: Use translator_use_goto_tb target/ppc: Use translator_use_goto_tb target/openrisc: Use translator_use_goto_tb target/nios2: Use translator_use_goto_tb ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/s390x')
-rw-r--r--target/s390x/translate.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/target/s390x/translate.c b/target/s390x/translate.c
index 8822603..c8d55d1 100644
--- a/target/s390x/translate.c
+++ b/target/s390x/translate.c
@@ -42,7 +42,6 @@
#include "exec/helper-proto.h"
#include "exec/helper-gen.h"
-#include "trace-tcg.h"
#include "exec/translator.h"
#include "exec/log.h"
#include "qemu/atomic128.h"
@@ -685,24 +684,12 @@ static void gen_op_calc_cc(DisasContext *s)
set_cc_static(s);
}
-static bool use_exit_tb(DisasContext *s)
-{
- return s->base.singlestep_enabled ||
- (tb_cflags(s->base.tb) & CF_LAST_IO) ||
- (s->base.tb->flags & FLAG_MASK_PER);
-}
-
static bool use_goto_tb(DisasContext *s, uint64_t dest)
{
- if (unlikely(use_exit_tb(s))) {
+ if (unlikely(s->base.tb->flags & FLAG_MASK_PER)) {
return false;
}
-#ifndef CONFIG_USER_ONLY
- return (dest & TARGET_PAGE_MASK) == (s->base.tb->pc & TARGET_PAGE_MASK) ||
- (dest & TARGET_PAGE_MASK) == (s->base.pc_next & TARGET_PAGE_MASK);
-#else
- return true;
-#endif
+ return translator_use_goto_tb(&s->base, dest);
}
static void account_noninline_branch(DisasContext *s, int cc_op)
@@ -6641,7 +6628,7 @@ static void s390x_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs)
/* Exit the TB, either by raising a debug exception or by return. */
if (dc->do_debug) {
gen_exception(EXCP_DEBUG);
- } else if (use_exit_tb(dc) ||
+ } else if ((dc->base.tb->flags & FLAG_MASK_PER) ||
dc->base.is_jmp == DISAS_PC_STALE_NOCHAIN) {
tcg_gen_exit_tb(NULL, 0);
} else {