Signed-off-by: Anton Johansson <anjo@rev.ng>
---
accel/tcg/cpu-exec.c | 8 +++----
accel/tcg/internal.h | 10 ++++----
accel/tcg/perf.c | 2 +-
accel/tcg/tb-jmp-cache.h | 48 ++++++++++++++++++-------------------
accel/tcg/tb-maint.c | 8 +++----
accel/tcg/translate-all.c | 14 +++++------
include/exec/cpu-defs.h | 3 ---
include/exec/exec-all.h | 27 +++++++++------------
target/arm/cpu.c | 8 +++----
target/arm/translate-a64.c | 8 +++----
target/arm/translate.c | 6 ++---
target/arm/translate.h | 2 +-
target/i386/helper.c | 2 +-
target/i386/tcg/tcg-cpu.c | 6 ++---
target/i386/tcg/translate.c | 26 ++++++++++----------
15 files changed, 84 insertions(+), 94 deletions(-)
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 9c857eeb07..0a84934ed4 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -186,7 +186,7 @@ static bool tb_lookup_cmp(const void *p, const void *d)
const TranslationBlock *tb = p;
const struct tb_desc *desc = d;
- if ((TARGET_TB_PCREL || tb_pc(tb) == desc->pc) &&
+ if ((tb_cflags(tb) & CF_PCREL || tb_pc(tb) == desc->pc) &&
tb_page_addr0(tb) == desc->page_addr0 &&
tb->cs_base == desc->cs_base &&
tb->flags == desc->flags &&
@@ -238,7 +238,7 @@ static TranslationBlock *tb_htable_lookup(CPUState *cpu,
target_ulong pc,
return NULL;
}
desc.page_addr0 = phys_pc;
- h = tb_hash_func(phys_pc, (TARGET_TB_PCREL ? 0 : pc),
+ h = tb_hash_func(phys_pc, (cflags & CF_PCREL ? 0 : pc),
flags, cflags, *cpu->trace_dstate);
return qht_lookup_custom(&tb_ctx.htable, &desc, h, tb_lookup_cmp);
}
@@ -257,7 +257,7 @@ static inline TranslationBlock *tb_lookup(CPUState *cpu,
target_ulong pc,
hash = tb_jmp_cache_hash_func(pc);
jc = cpu->tb_jmp_cache;
- tb = tb_jmp_cache_get_tb(jc, hash);
+ tb = tb_jmp_cache_get_tb(jc, cflags, hash);
if (likely(tb &&
tb_jmp_cache_get_pc(jc, hash, tb) == pc &&
@@ -460,7 +460,7 @@ cpu_tb_exec(CPUState *cpu, TranslationBlock *itb, int
*tb_exit)
if (cc->tcg_ops->synchronize_from_tb) {
cc->tcg_ops->synchronize_from_tb(cpu, last_tb);
} else {