aboutsummaryrefslogtreecommitdiff
path: root/target/arm
diff options
context:
space:
mode:
Diffstat (limited to 'target/arm')
-rw-r--r--target/arm/translate-a64.c26
-rw-r--r--target/arm/translate-sve.c1
-rw-r--r--target/arm/translate.c17
3 files changed, 8 insertions, 36 deletions
diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
index e81cc20d04..ca11a5fecd 100644
--- a/target/arm/translate-a64.c
+++ b/target/arm/translate-a64.c
@@ -35,7 +35,6 @@
#include "exec/helper-gen.h"
#include "exec/log.h"
-#include "trace-tcg.h"
#include "translate-a64.h"
#include "qemu/atomic128.h"
@@ -386,35 +385,20 @@ static void gen_step_complete_exception(DisasContext *s)
s->base.is_jmp = DISAS_NORETURN;
}
-static inline bool use_goto_tb(DisasContext *s, int n, uint64_t dest)
+static inline bool use_goto_tb(DisasContext *s, uint64_t dest)
{
- /* No direct tb linking with singlestep (either QEMU's or the ARM
- * debug architecture kind) or deterministic io
- */
- if (s->base.singlestep_enabled || s->ss_active ||
- (tb_cflags(s->base.tb) & CF_LAST_IO)) {
- return false;
- }
-
-#ifndef CONFIG_USER_ONLY
- /* Only link tbs from inside the same guest page */
- if ((s->base.tb->pc & TARGET_PAGE_MASK) != (dest & TARGET_PAGE_MASK)) {
+ if (s->ss_active) {
return false;
}
-#endif
-
- return true;
+ return translator_use_goto_tb(&s->base, dest);
}
static inline void gen_goto_tb(DisasContext *s, int n, uint64_t dest)
{
- const TranslationBlock *tb;
-
- tb = s->base.tb;
- if (use_goto_tb(s, n, dest)) {
+ if (use_goto_tb(s, dest)) {
tcg_gen_goto_tb(n);
gen_a64_set_pc_im(dest);
- tcg_gen_exit_tb(tb, n);
+ tcg_gen_exit_tb(s->base.tb, n);
s->base.is_jmp = DISAS_NORETURN;
} else {
gen_a64_set_pc_im(dest);
diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c
index 46210eb696..35d838aa06 100644
--- a/target/arm/translate-sve.c
+++ b/target/arm/translate-sve.c
@@ -30,7 +30,6 @@
#include "exec/helper-proto.h"
#include "exec/helper-gen.h"
#include "exec/log.h"
-#include "trace-tcg.h"
#include "translate-a64.h"
#include "fpu/softfloat.h"
diff --git a/target/arm/translate.c b/target/arm/translate.c
index 28e478927d..e1a8152598 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -34,7 +34,6 @@
#include "exec/helper-proto.h"
#include "exec/helper-gen.h"
-#include "trace-tcg.h"
#include "exec/log.h"
@@ -2579,16 +2578,6 @@ static int disas_dsp_insn(DisasContext *s, uint32_t insn)
return 1;
}
-static inline bool use_goto_tb(DisasContext *s, target_ulong dest)
-{
-#ifndef CONFIG_USER_ONLY
- return (s->base.tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK) ||
- ((s->base.pc_next - 1) & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK);
-#else
- return true;
-#endif
-}
-
static void gen_goto_ptr(void)
{
tcg_gen_lookup_and_goto_ptr();
@@ -2600,7 +2589,7 @@ static void gen_goto_ptr(void)
*/
static void gen_goto_tb(DisasContext *s, int n, target_ulong dest)
{
- if (use_goto_tb(s, dest)) {
+ if (translator_use_goto_tb(&s->base, dest)) {
tcg_gen_goto_tb(n);
gen_set_pc_im(s, dest);
tcg_gen_exit_tb(s->base.tb, n);
@@ -8905,7 +8894,7 @@ static bool trans_ISB(DisasContext *s, arg_ISB *a)
* self-modifying code correctly and also to take
* any pending interrupts immediately.
*/
- gen_goto_tb(s, 0, s->base.pc_next);
+ s->base.is_jmp = DISAS_TOO_MANY;
return true;
}
@@ -8919,7 +8908,7 @@ static bool trans_SB(DisasContext *s, arg_SB *a)
* for TCG; MB and end the TB instead.
*/
tcg_gen_mb(TCG_MO_ALL | TCG_BAR_SC);
- gen_goto_tb(s, 0, s->base.pc_next);
+ s->base.is_jmp = DISAS_TOO_MANY;
return true;
}