tcg: Cache invalidated TBs

This commit is contained in:
Matt Borgerson
2021-10-30 04:09:30 -07:00
committed by mborgerson
parent 703566ce33
commit c1e4e87f5f
8 changed files with 84 additions and 5 deletions
+1
View File
@@ -428,6 +428,7 @@ uint32_t cpu_ldub_code(CPUArchState *env, abi_ptr addr);
uint32_t cpu_lduw_code(CPUArchState *env, abi_ptr addr);
uint32_t cpu_ldl_code(CPUArchState *env, abi_ptr addr);
uint64_t cpu_ldq_code(CPUArchState *env, abi_ptr addr);
void cpu_ld_code(CPUArchState *env, abi_ptr addr, size_t len, uint8_t *out);
static inline int cpu_ldsb_code(CPUArchState *env, abi_ptr addr)
{
+4
View File
@@ -516,6 +516,7 @@ struct TranslationBlock {
/* size of target code for this block (1 <= size <= TARGET_PAGE_SIZE) */
uint16_t size;
uint16_t icount;
uint64_t ihash;
struct tb_tc tc;
@@ -582,6 +583,9 @@ void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr);
TranslationBlock *tb_htable_lookup(CPUState *cpu, target_ulong pc,
target_ulong cs_base, uint32_t flags,
uint32_t cflags);
TranslationBlock *inv_tb_htable_lookup(CPUState *cpu, target_ulong pc,
target_ulong cs_base, uint32_t flags,
uint32_t cflags);
void tb_set_jmp_target(TranslationBlock *tb, int n, uintptr_t addr);
/* GETPC is the true target of the return instruction that we'll execute. */