mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-08 10:09:43 +00:00
exec-all: rename tb_free to tb_remove
We don't really free anything in this function anymore; we just remove the TB from the binary search tree. Backports commit be1e01171b556807198c84feac7cf4bca0d904c2 from qemu
This commit is contained in:
parent
f7c984d21f
commit
66fa401871
|
@ -2439,7 +2439,6 @@
|
|||
#define tb_find_slow tb_find_slow_aarch64
|
||||
#define tb_flush tb_flush_aarch64
|
||||
#define tb_flush_jmp_cache tb_flush_jmp_cache_aarch64
|
||||
#define tb_free tb_free_aarch64
|
||||
#define tb_gen_code tb_gen_code_aarch64
|
||||
#define tb_hash_remove tb_hash_remove_aarch64
|
||||
#define tb_htable_lookup tb_htable_lookup_aarch64
|
||||
|
@ -2454,6 +2453,7 @@
|
|||
#define tb_page_remove tb_page_remove_aarch64
|
||||
#define tb_phys_hash_func tb_phys_hash_func_aarch64
|
||||
#define tb_phys_invalidate tb_phys_invalidate_aarch64
|
||||
#define tb_remove tb_remove_aarch64
|
||||
#define tb_reset_jump tb_reset_jump_aarch64
|
||||
#define tb_set_jmp_target tb_set_jmp_target_aarch64
|
||||
#define tcg_accel_class_init tcg_accel_class_init_aarch64
|
||||
|
|
|
@ -2439,7 +2439,6 @@
|
|||
#define tb_find_slow tb_find_slow_aarch64eb
|
||||
#define tb_flush tb_flush_aarch64eb
|
||||
#define tb_flush_jmp_cache tb_flush_jmp_cache_aarch64eb
|
||||
#define tb_free tb_free_aarch64eb
|
||||
#define tb_gen_code tb_gen_code_aarch64eb
|
||||
#define tb_hash_remove tb_hash_remove_aarch64eb
|
||||
#define tb_htable_lookup tb_htable_lookup_aarch64eb
|
||||
|
@ -2454,6 +2453,7 @@
|
|||
#define tb_page_remove tb_page_remove_aarch64eb
|
||||
#define tb_phys_hash_func tb_phys_hash_func_aarch64eb
|
||||
#define tb_phys_invalidate tb_phys_invalidate_aarch64eb
|
||||
#define tb_remove tb_remove_aarch64eb
|
||||
#define tb_reset_jump tb_reset_jump_aarch64eb
|
||||
#define tb_set_jmp_target tb_set_jmp_target_aarch64eb
|
||||
#define tcg_accel_class_init tcg_accel_class_init_aarch64eb
|
||||
|
|
|
@ -111,7 +111,7 @@ static void cpu_exec_nocache(CPUState *cpu, int max_cycles,
|
|||
//trace_exec_tb_nocache(tb, tb->pc);
|
||||
cpu_tb_exec(cpu, tb);
|
||||
tb_phys_invalidate(env->uc, tb, -1);
|
||||
tb_free(env->uc, tb);
|
||||
tb_remove(env->uc, tb);
|
||||
}
|
||||
|
||||
struct tb_desc {
|
||||
|
|
|
@ -354,7 +354,7 @@ bool cpu_restore_state(CPUState *cpu, uintptr_t retaddr)
|
|||
if (tb->cflags & CF_NOCACHE) {
|
||||
/* one-shot translation, invalidate it immediately */
|
||||
tb_phys_invalidate(cpu->uc, tb, -1);
|
||||
tb_free(cpu->uc, tb);
|
||||
tb_remove(cpu->uc, tb);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -921,7 +921,7 @@ static TranslationBlock *tb_alloc(struct uc_struct *uc, target_ulong pc)
|
|||
}
|
||||
|
||||
/* Called with tb_lock held. */
|
||||
void tb_free(struct uc_struct *uc, TranslationBlock *tb)
|
||||
void tb_remove(struct uc_struct *uc, TranslationBlock *tb)
|
||||
{
|
||||
TCGContext *tcg_ctx = uc->tcg_ctx;
|
||||
|
||||
|
@ -1857,7 +1857,7 @@ void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr)
|
|||
* cpu_exec_nocache() */
|
||||
tb_phys_invalidate(cpu->uc, tb->orig_tb, -1);
|
||||
}
|
||||
tb_free(env->uc, tb);
|
||||
tb_remove(env->uc, tb);
|
||||
}
|
||||
|
||||
/* TODO: If env->pc != tb->pc (i.e. the faulting instruction was not
|
||||
|
|
|
@ -2439,7 +2439,6 @@
|
|||
#define tb_find_slow tb_find_slow_arm
|
||||
#define tb_flush tb_flush_arm
|
||||
#define tb_flush_jmp_cache tb_flush_jmp_cache_arm
|
||||
#define tb_free tb_free_arm
|
||||
#define tb_gen_code tb_gen_code_arm
|
||||
#define tb_hash_remove tb_hash_remove_arm
|
||||
#define tb_htable_lookup tb_htable_lookup_arm
|
||||
|
@ -2454,6 +2453,7 @@
|
|||
#define tb_page_remove tb_page_remove_arm
|
||||
#define tb_phys_hash_func tb_phys_hash_func_arm
|
||||
#define tb_phys_invalidate tb_phys_invalidate_arm
|
||||
#define tb_remove tb_remove_arm
|
||||
#define tb_reset_jump tb_reset_jump_arm
|
||||
#define tb_set_jmp_target tb_set_jmp_target_arm
|
||||
#define tcg_accel_class_init tcg_accel_class_init_arm
|
||||
|
|
|
@ -2439,7 +2439,6 @@
|
|||
#define tb_find_slow tb_find_slow_armeb
|
||||
#define tb_flush tb_flush_armeb
|
||||
#define tb_flush_jmp_cache tb_flush_jmp_cache_armeb
|
||||
#define tb_free tb_free_armeb
|
||||
#define tb_gen_code tb_gen_code_armeb
|
||||
#define tb_hash_remove tb_hash_remove_armeb
|
||||
#define tb_htable_lookup tb_htable_lookup_armeb
|
||||
|
@ -2454,6 +2453,7 @@
|
|||
#define tb_page_remove tb_page_remove_armeb
|
||||
#define tb_phys_hash_func tb_phys_hash_func_armeb
|
||||
#define tb_phys_invalidate tb_phys_invalidate_armeb
|
||||
#define tb_remove tb_remove_armeb
|
||||
#define tb_reset_jump tb_reset_jump_armeb
|
||||
#define tb_set_jmp_target tb_set_jmp_target_armeb
|
||||
#define tcg_accel_class_init tcg_accel_class_init_armeb
|
||||
|
|
|
@ -2445,7 +2445,6 @@ symbols = (
|
|||
'tb_find_slow',
|
||||
'tb_flush',
|
||||
'tb_flush_jmp_cache',
|
||||
'tb_free',
|
||||
'tb_gen_code',
|
||||
'tb_hash_remove',
|
||||
'tb_htable_lookup',
|
||||
|
@ -2460,6 +2459,7 @@ symbols = (
|
|||
'tb_page_remove',
|
||||
'tb_phys_hash_func',
|
||||
'tb_phys_invalidate',
|
||||
'tb_remove',
|
||||
'tb_reset_jump',
|
||||
'tb_set_jmp_target',
|
||||
'tcg_accel_class_init',
|
||||
|
|
|
@ -291,7 +291,7 @@ static inline uint32_t curr_cflags(struct uc_struct *uc)
|
|||
// | (use_icount ? CF_USE_ICOUNT : 0);
|
||||
}
|
||||
|
||||
void tb_free(struct uc_struct *uc, TranslationBlock *tb);
|
||||
void tb_remove(struct uc_struct *uc, TranslationBlock *tb);
|
||||
void tb_flush(CPUState *cpu);
|
||||
void tb_phys_invalidate(struct uc_struct *uc,
|
||||
TranslationBlock *tb, tb_page_addr_t page_addr);
|
||||
|
|
|
@ -2439,7 +2439,6 @@
|
|||
#define tb_find_slow tb_find_slow_m68k
|
||||
#define tb_flush tb_flush_m68k
|
||||
#define tb_flush_jmp_cache tb_flush_jmp_cache_m68k
|
||||
#define tb_free tb_free_m68k
|
||||
#define tb_gen_code tb_gen_code_m68k
|
||||
#define tb_hash_remove tb_hash_remove_m68k
|
||||
#define tb_htable_lookup tb_htable_lookup_m68k
|
||||
|
@ -2454,6 +2453,7 @@
|
|||
#define tb_page_remove tb_page_remove_m68k
|
||||
#define tb_phys_hash_func tb_phys_hash_func_m68k
|
||||
#define tb_phys_invalidate tb_phys_invalidate_m68k
|
||||
#define tb_remove tb_remove_m68k
|
||||
#define tb_reset_jump tb_reset_jump_m68k
|
||||
#define tb_set_jmp_target tb_set_jmp_target_m68k
|
||||
#define tcg_accel_class_init tcg_accel_class_init_m68k
|
||||
|
|
|
@ -2439,7 +2439,6 @@
|
|||
#define tb_find_slow tb_find_slow_mips
|
||||
#define tb_flush tb_flush_mips
|
||||
#define tb_flush_jmp_cache tb_flush_jmp_cache_mips
|
||||
#define tb_free tb_free_mips
|
||||
#define tb_gen_code tb_gen_code_mips
|
||||
#define tb_hash_remove tb_hash_remove_mips
|
||||
#define tb_htable_lookup tb_htable_lookup_mips
|
||||
|
@ -2454,6 +2453,7 @@
|
|||
#define tb_page_remove tb_page_remove_mips
|
||||
#define tb_phys_hash_func tb_phys_hash_func_mips
|
||||
#define tb_phys_invalidate tb_phys_invalidate_mips
|
||||
#define tb_remove tb_remove_mips
|
||||
#define tb_reset_jump tb_reset_jump_mips
|
||||
#define tb_set_jmp_target tb_set_jmp_target_mips
|
||||
#define tcg_accel_class_init tcg_accel_class_init_mips
|
||||
|
|
|
@ -2439,7 +2439,6 @@
|
|||
#define tb_find_slow tb_find_slow_mips64
|
||||
#define tb_flush tb_flush_mips64
|
||||
#define tb_flush_jmp_cache tb_flush_jmp_cache_mips64
|
||||
#define tb_free tb_free_mips64
|
||||
#define tb_gen_code tb_gen_code_mips64
|
||||
#define tb_hash_remove tb_hash_remove_mips64
|
||||
#define tb_htable_lookup tb_htable_lookup_mips64
|
||||
|
@ -2454,6 +2453,7 @@
|
|||
#define tb_page_remove tb_page_remove_mips64
|
||||
#define tb_phys_hash_func tb_phys_hash_func_mips64
|
||||
#define tb_phys_invalidate tb_phys_invalidate_mips64
|
||||
#define tb_remove tb_remove_mips64
|
||||
#define tb_reset_jump tb_reset_jump_mips64
|
||||
#define tb_set_jmp_target tb_set_jmp_target_mips64
|
||||
#define tcg_accel_class_init tcg_accel_class_init_mips64
|
||||
|
|
|
@ -2439,7 +2439,6 @@
|
|||
#define tb_find_slow tb_find_slow_mips64el
|
||||
#define tb_flush tb_flush_mips64el
|
||||
#define tb_flush_jmp_cache tb_flush_jmp_cache_mips64el
|
||||
#define tb_free tb_free_mips64el
|
||||
#define tb_gen_code tb_gen_code_mips64el
|
||||
#define tb_hash_remove tb_hash_remove_mips64el
|
||||
#define tb_htable_lookup tb_htable_lookup_mips64el
|
||||
|
@ -2454,6 +2453,7 @@
|
|||
#define tb_page_remove tb_page_remove_mips64el
|
||||
#define tb_phys_hash_func tb_phys_hash_func_mips64el
|
||||
#define tb_phys_invalidate tb_phys_invalidate_mips64el
|
||||
#define tb_remove tb_remove_mips64el
|
||||
#define tb_reset_jump tb_reset_jump_mips64el
|
||||
#define tb_set_jmp_target tb_set_jmp_target_mips64el
|
||||
#define tcg_accel_class_init tcg_accel_class_init_mips64el
|
||||
|
|
|
@ -2439,7 +2439,6 @@
|
|||
#define tb_find_slow tb_find_slow_mipsel
|
||||
#define tb_flush tb_flush_mipsel
|
||||
#define tb_flush_jmp_cache tb_flush_jmp_cache_mipsel
|
||||
#define tb_free tb_free_mipsel
|
||||
#define tb_gen_code tb_gen_code_mipsel
|
||||
#define tb_hash_remove tb_hash_remove_mipsel
|
||||
#define tb_htable_lookup tb_htable_lookup_mipsel
|
||||
|
@ -2454,6 +2453,7 @@
|
|||
#define tb_page_remove tb_page_remove_mipsel
|
||||
#define tb_phys_hash_func tb_phys_hash_func_mipsel
|
||||
#define tb_phys_invalidate tb_phys_invalidate_mipsel
|
||||
#define tb_remove tb_remove_mipsel
|
||||
#define tb_reset_jump tb_reset_jump_mipsel
|
||||
#define tb_set_jmp_target tb_set_jmp_target_mipsel
|
||||
#define tcg_accel_class_init tcg_accel_class_init_mipsel
|
||||
|
|
|
@ -2439,7 +2439,6 @@
|
|||
#define tb_find_slow tb_find_slow_powerpc
|
||||
#define tb_flush tb_flush_powerpc
|
||||
#define tb_flush_jmp_cache tb_flush_jmp_cache_powerpc
|
||||
#define tb_free tb_free_powerpc
|
||||
#define tb_gen_code tb_gen_code_powerpc
|
||||
#define tb_hash_remove tb_hash_remove_powerpc
|
||||
#define tb_htable_lookup tb_htable_lookup_powerpc
|
||||
|
@ -2454,6 +2453,7 @@
|
|||
#define tb_page_remove tb_page_remove_powerpc
|
||||
#define tb_phys_hash_func tb_phys_hash_func_powerpc
|
||||
#define tb_phys_invalidate tb_phys_invalidate_powerpc
|
||||
#define tb_remove tb_remove_powerpc
|
||||
#define tb_reset_jump tb_reset_jump_powerpc
|
||||
#define tb_set_jmp_target tb_set_jmp_target_powerpc
|
||||
#define tcg_accel_class_init tcg_accel_class_init_powerpc
|
||||
|
|
|
@ -2439,7 +2439,6 @@
|
|||
#define tb_find_slow tb_find_slow_sparc
|
||||
#define tb_flush tb_flush_sparc
|
||||
#define tb_flush_jmp_cache tb_flush_jmp_cache_sparc
|
||||
#define tb_free tb_free_sparc
|
||||
#define tb_gen_code tb_gen_code_sparc
|
||||
#define tb_hash_remove tb_hash_remove_sparc
|
||||
#define tb_htable_lookup tb_htable_lookup_sparc
|
||||
|
@ -2454,6 +2453,7 @@
|
|||
#define tb_page_remove tb_page_remove_sparc
|
||||
#define tb_phys_hash_func tb_phys_hash_func_sparc
|
||||
#define tb_phys_invalidate tb_phys_invalidate_sparc
|
||||
#define tb_remove tb_remove_sparc
|
||||
#define tb_reset_jump tb_reset_jump_sparc
|
||||
#define tb_set_jmp_target tb_set_jmp_target_sparc
|
||||
#define tcg_accel_class_init tcg_accel_class_init_sparc
|
||||
|
|
|
@ -2439,7 +2439,6 @@
|
|||
#define tb_find_slow tb_find_slow_sparc64
|
||||
#define tb_flush tb_flush_sparc64
|
||||
#define tb_flush_jmp_cache tb_flush_jmp_cache_sparc64
|
||||
#define tb_free tb_free_sparc64
|
||||
#define tb_gen_code tb_gen_code_sparc64
|
||||
#define tb_hash_remove tb_hash_remove_sparc64
|
||||
#define tb_htable_lookup tb_htable_lookup_sparc64
|
||||
|
@ -2454,6 +2453,7 @@
|
|||
#define tb_page_remove tb_page_remove_sparc64
|
||||
#define tb_phys_hash_func tb_phys_hash_func_sparc64
|
||||
#define tb_phys_invalidate tb_phys_invalidate_sparc64
|
||||
#define tb_remove tb_remove_sparc64
|
||||
#define tb_reset_jump tb_reset_jump_sparc64
|
||||
#define tb_set_jmp_target tb_set_jmp_target_sparc64
|
||||
#define tcg_accel_class_init tcg_accel_class_init_sparc64
|
||||
|
|
|
@ -2439,7 +2439,6 @@
|
|||
#define tb_find_slow tb_find_slow_x86_64
|
||||
#define tb_flush tb_flush_x86_64
|
||||
#define tb_flush_jmp_cache tb_flush_jmp_cache_x86_64
|
||||
#define tb_free tb_free_x86_64
|
||||
#define tb_gen_code tb_gen_code_x86_64
|
||||
#define tb_hash_remove tb_hash_remove_x86_64
|
||||
#define tb_htable_lookup tb_htable_lookup_x86_64
|
||||
|
@ -2454,6 +2453,7 @@
|
|||
#define tb_page_remove tb_page_remove_x86_64
|
||||
#define tb_phys_hash_func tb_phys_hash_func_x86_64
|
||||
#define tb_phys_invalidate tb_phys_invalidate_x86_64
|
||||
#define tb_remove tb_remove_x86_64
|
||||
#define tb_reset_jump tb_reset_jump_x86_64
|
||||
#define tb_set_jmp_target tb_set_jmp_target_x86_64
|
||||
#define tcg_accel_class_init tcg_accel_class_init_x86_64
|
||||
|
|
Loading…
Reference in a new issue