diff options
author | Alex Bennée | 2021-02-24 17:58:09 +0100 |
---|---|---|
committer | Richard Henderson | 2021-03-06 20:52:06 +0100 |
commit | bf253ac606de4a934e41ba178bf4f1338c554cec (patch) | |
tree | 1bfd3bd5ed5f7f474e52fccfcfd24692b3165e7e /include/exec/tb-lookup.h | |
parent | accel/tcg: move CF_CLUSTER calculation to curr_cflags (diff) | |
download | qemu-bf253ac606de4a934e41ba178bf4f1338c554cec.tar.gz qemu-bf253ac606de4a934e41ba178bf4f1338c554cec.tar.xz qemu-bf253ac606de4a934e41ba178bf4f1338c554cec.zip |
accel/tcg: drop the use of CF_HASH_MASK and rename params
We don't really deal in cf_mask most of the time. The one time it's
relevant is when we want to remove an invalidated TB from the QHT
lookup. Everywhere else we should be looking up things without
CF_INVALID set.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210224165811.11567-4-alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/exec/tb-lookup.h')
-rw-r--r-- | include/exec/tb-lookup.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/exec/tb-lookup.h b/include/exec/tb-lookup.h index 1c92fe0521..29d61ceb34 100644 --- a/include/exec/tb-lookup.h +++ b/include/exec/tb-lookup.h @@ -19,11 +19,14 @@ /* Might cause an exception, so have a longjmp destination ready */ static inline TranslationBlock *tb_lookup(CPUState *cpu, target_ulong pc, target_ulong cs_base, - uint32_t flags, uint32_t cf_mask) + uint32_t flags, uint32_t cflags) { TranslationBlock *tb; uint32_t hash; + /* we should never be trying to look up an INVALID tb */ + tcg_debug_assert(!(cflags & CF_INVALID)); + hash = tb_jmp_cache_hash_func(pc); tb = qatomic_rcu_read(&cpu->tb_jmp_cache[hash]); @@ -32,10 +35,10 @@ static inline TranslationBlock *tb_lookup(CPUState *cpu, target_ulong pc, tb->cs_base == cs_base && tb->flags == flags && tb->trace_vcpu_dstate == *cpu->trace_dstate && - (tb_cflags(tb) & (CF_HASH_MASK | CF_INVALID)) == cf_mask)) { + tb_cflags(tb) == cflags)) { return tb; } - tb = tb_htable_lookup(cpu, pc, cs_base, flags, cf_mask); + tb = tb_htable_lookup(cpu, pc, cs_base, flags, cflags); if (tb == NULL) { return NULL; } |