mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-05-02 13:06:19 +00:00
tcg: Remove tcg_gen_code_search_pc
It's no longer used, so tidy up everything reached by it. Backports commit 04fe64000162c45d8974da9ca4d266f8d0e67eb7 from qemu
This commit is contained in:
parent
f0f8d5764a
commit
532877a366
|
@ -2761,8 +2761,6 @@
|
||||||
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_aarch64
|
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_aarch64
|
||||||
#define tcg_gen_callN tcg_gen_callN_aarch64
|
#define tcg_gen_callN tcg_gen_callN_aarch64
|
||||||
#define tcg_gen_code tcg_gen_code_aarch64
|
#define tcg_gen_code tcg_gen_code_aarch64
|
||||||
#define tcg_gen_code_common tcg_gen_code_common_aarch64
|
|
||||||
#define tcg_gen_code_search_pc tcg_gen_code_search_pc_aarch64
|
|
||||||
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_aarch64
|
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_aarch64
|
||||||
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_aarch64
|
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_aarch64
|
||||||
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_aarch64
|
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_aarch64
|
||||||
|
|
|
@ -2761,8 +2761,6 @@
|
||||||
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_aarch64eb
|
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_aarch64eb
|
||||||
#define tcg_gen_callN tcg_gen_callN_aarch64eb
|
#define tcg_gen_callN tcg_gen_callN_aarch64eb
|
||||||
#define tcg_gen_code tcg_gen_code_aarch64eb
|
#define tcg_gen_code tcg_gen_code_aarch64eb
|
||||||
#define tcg_gen_code_common tcg_gen_code_common_aarch64eb
|
|
||||||
#define tcg_gen_code_search_pc tcg_gen_code_search_pc_aarch64eb
|
|
||||||
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_aarch64eb
|
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_aarch64eb
|
||||||
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_aarch64eb
|
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_aarch64eb
|
||||||
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_aarch64eb
|
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_aarch64eb
|
||||||
|
|
|
@ -2761,8 +2761,6 @@
|
||||||
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_arm
|
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_arm
|
||||||
#define tcg_gen_callN tcg_gen_callN_arm
|
#define tcg_gen_callN tcg_gen_callN_arm
|
||||||
#define tcg_gen_code tcg_gen_code_arm
|
#define tcg_gen_code tcg_gen_code_arm
|
||||||
#define tcg_gen_code_common tcg_gen_code_common_arm
|
|
||||||
#define tcg_gen_code_search_pc tcg_gen_code_search_pc_arm
|
|
||||||
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_arm
|
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_arm
|
||||||
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_arm
|
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_arm
|
||||||
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_arm
|
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_arm
|
||||||
|
|
|
@ -2761,8 +2761,6 @@
|
||||||
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_armeb
|
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_armeb
|
||||||
#define tcg_gen_callN tcg_gen_callN_armeb
|
#define tcg_gen_callN tcg_gen_callN_armeb
|
||||||
#define tcg_gen_code tcg_gen_code_armeb
|
#define tcg_gen_code tcg_gen_code_armeb
|
||||||
#define tcg_gen_code_common tcg_gen_code_common_armeb
|
|
||||||
#define tcg_gen_code_search_pc tcg_gen_code_search_pc_armeb
|
|
||||||
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_armeb
|
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_armeb
|
||||||
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_armeb
|
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_armeb
|
||||||
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_armeb
|
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_armeb
|
||||||
|
|
|
@ -2767,8 +2767,6 @@ symbols = (
|
||||||
'tcg_gen_bswap64_i64',
|
'tcg_gen_bswap64_i64',
|
||||||
'tcg_gen_callN',
|
'tcg_gen_callN',
|
||||||
'tcg_gen_code',
|
'tcg_gen_code',
|
||||||
'tcg_gen_code_common',
|
|
||||||
'tcg_gen_code_search_pc',
|
|
||||||
'tcg_gen_concat_i32_i64',
|
'tcg_gen_concat_i32_i64',
|
||||||
'tcg_gen_deposit_i32',
|
'tcg_gen_deposit_i32',
|
||||||
'tcg_gen_deposit_i64',
|
'tcg_gen_deposit_i64',
|
||||||
|
|
|
@ -2761,8 +2761,6 @@
|
||||||
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_m68k
|
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_m68k
|
||||||
#define tcg_gen_callN tcg_gen_callN_m68k
|
#define tcg_gen_callN tcg_gen_callN_m68k
|
||||||
#define tcg_gen_code tcg_gen_code_m68k
|
#define tcg_gen_code tcg_gen_code_m68k
|
||||||
#define tcg_gen_code_common tcg_gen_code_common_m68k
|
|
||||||
#define tcg_gen_code_search_pc tcg_gen_code_search_pc_m68k
|
|
||||||
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_m68k
|
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_m68k
|
||||||
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_m68k
|
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_m68k
|
||||||
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_m68k
|
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_m68k
|
||||||
|
|
|
@ -2761,8 +2761,6 @@
|
||||||
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_mips
|
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_mips
|
||||||
#define tcg_gen_callN tcg_gen_callN_mips
|
#define tcg_gen_callN tcg_gen_callN_mips
|
||||||
#define tcg_gen_code tcg_gen_code_mips
|
#define tcg_gen_code tcg_gen_code_mips
|
||||||
#define tcg_gen_code_common tcg_gen_code_common_mips
|
|
||||||
#define tcg_gen_code_search_pc tcg_gen_code_search_pc_mips
|
|
||||||
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_mips
|
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_mips
|
||||||
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_mips
|
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_mips
|
||||||
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_mips
|
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_mips
|
||||||
|
|
|
@ -2761,8 +2761,6 @@
|
||||||
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_mips64
|
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_mips64
|
||||||
#define tcg_gen_callN tcg_gen_callN_mips64
|
#define tcg_gen_callN tcg_gen_callN_mips64
|
||||||
#define tcg_gen_code tcg_gen_code_mips64
|
#define tcg_gen_code tcg_gen_code_mips64
|
||||||
#define tcg_gen_code_common tcg_gen_code_common_mips64
|
|
||||||
#define tcg_gen_code_search_pc tcg_gen_code_search_pc_mips64
|
|
||||||
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_mips64
|
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_mips64
|
||||||
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_mips64
|
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_mips64
|
||||||
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_mips64
|
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_mips64
|
||||||
|
|
|
@ -2761,8 +2761,6 @@
|
||||||
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_mips64el
|
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_mips64el
|
||||||
#define tcg_gen_callN tcg_gen_callN_mips64el
|
#define tcg_gen_callN tcg_gen_callN_mips64el
|
||||||
#define tcg_gen_code tcg_gen_code_mips64el
|
#define tcg_gen_code tcg_gen_code_mips64el
|
||||||
#define tcg_gen_code_common tcg_gen_code_common_mips64el
|
|
||||||
#define tcg_gen_code_search_pc tcg_gen_code_search_pc_mips64el
|
|
||||||
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_mips64el
|
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_mips64el
|
||||||
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_mips64el
|
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_mips64el
|
||||||
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_mips64el
|
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_mips64el
|
||||||
|
|
|
@ -2761,8 +2761,6 @@
|
||||||
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_mipsel
|
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_mipsel
|
||||||
#define tcg_gen_callN tcg_gen_callN_mipsel
|
#define tcg_gen_callN tcg_gen_callN_mipsel
|
||||||
#define tcg_gen_code tcg_gen_code_mipsel
|
#define tcg_gen_code tcg_gen_code_mipsel
|
||||||
#define tcg_gen_code_common tcg_gen_code_common_mipsel
|
|
||||||
#define tcg_gen_code_search_pc tcg_gen_code_search_pc_mipsel
|
|
||||||
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_mipsel
|
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_mipsel
|
||||||
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_mipsel
|
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_mipsel
|
||||||
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_mipsel
|
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_mipsel
|
||||||
|
|
|
@ -2761,8 +2761,6 @@
|
||||||
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_powerpc
|
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_powerpc
|
||||||
#define tcg_gen_callN tcg_gen_callN_powerpc
|
#define tcg_gen_callN tcg_gen_callN_powerpc
|
||||||
#define tcg_gen_code tcg_gen_code_powerpc
|
#define tcg_gen_code tcg_gen_code_powerpc
|
||||||
#define tcg_gen_code_common tcg_gen_code_common_powerpc
|
|
||||||
#define tcg_gen_code_search_pc tcg_gen_code_search_pc_powerpc
|
|
||||||
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_powerpc
|
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_powerpc
|
||||||
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_powerpc
|
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_powerpc
|
||||||
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_powerpc
|
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_powerpc
|
||||||
|
|
|
@ -2761,8 +2761,6 @@
|
||||||
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_sparc
|
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_sparc
|
||||||
#define tcg_gen_callN tcg_gen_callN_sparc
|
#define tcg_gen_callN tcg_gen_callN_sparc
|
||||||
#define tcg_gen_code tcg_gen_code_sparc
|
#define tcg_gen_code tcg_gen_code_sparc
|
||||||
#define tcg_gen_code_common tcg_gen_code_common_sparc
|
|
||||||
#define tcg_gen_code_search_pc tcg_gen_code_search_pc_sparc
|
|
||||||
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_sparc
|
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_sparc
|
||||||
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_sparc
|
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_sparc
|
||||||
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_sparc
|
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_sparc
|
||||||
|
|
|
@ -2761,8 +2761,6 @@
|
||||||
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_sparc64
|
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_sparc64
|
||||||
#define tcg_gen_callN tcg_gen_callN_sparc64
|
#define tcg_gen_callN tcg_gen_callN_sparc64
|
||||||
#define tcg_gen_code tcg_gen_code_sparc64
|
#define tcg_gen_code tcg_gen_code_sparc64
|
||||||
#define tcg_gen_code_common tcg_gen_code_common_sparc64
|
|
||||||
#define tcg_gen_code_search_pc tcg_gen_code_search_pc_sparc64
|
|
||||||
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_sparc64
|
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_sparc64
|
||||||
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_sparc64
|
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_sparc64
|
||||||
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_sparc64
|
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_sparc64
|
||||||
|
|
|
@ -2331,12 +2331,28 @@ static void dump_op_count(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static inline int tcg_gen_code_common(TCGContext *s,
|
int tcg_gen_code(TCGContext *s, tcg_insn_unit *gen_code_buf)
|
||||||
tcg_insn_unit *gen_code_buf,
|
|
||||||
long search_pc)
|
|
||||||
{
|
{
|
||||||
int i, oi, oi_next, num_insns;
|
int i, oi, oi_next, num_insns;
|
||||||
|
|
||||||
|
#ifdef CONFIG_PROFILER
|
||||||
|
{
|
||||||
|
int n;
|
||||||
|
|
||||||
|
n = s->gen_last_op_idx + 1;
|
||||||
|
s->op_count += n;
|
||||||
|
if (n > s->op_count_max) {
|
||||||
|
s->op_count_max = n;
|
||||||
|
}
|
||||||
|
|
||||||
|
n = s->nb_temps;
|
||||||
|
s->temp_count += n;
|
||||||
|
if (n > s->temp_count_max) {
|
||||||
|
s->temp_count_max = n;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG_DISAS
|
#ifdef DEBUG_DISAS
|
||||||
if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) {
|
if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) {
|
||||||
qemu_log("OP:\n");
|
qemu_log("OP:\n");
|
||||||
|
@ -2438,9 +2454,6 @@ static inline int tcg_gen_code_common(TCGContext *s,
|
||||||
tcg_reg_alloc_op(s, def, opc, args, dead_args, sync_args);
|
tcg_reg_alloc_op(s, def, opc, args, dead_args, sync_args);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (search_pc >= 0 && (size_t)search_pc < tcg_current_code_size(s)) {
|
|
||||||
return oi;
|
|
||||||
}
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
check_regs(s);
|
check_regs(s);
|
||||||
#endif
|
#endif
|
||||||
|
@ -2451,35 +2464,6 @@ static inline int tcg_gen_code_common(TCGContext *s,
|
||||||
|
|
||||||
/* Generate TB finalization at the end of block */
|
/* Generate TB finalization at the end of block */
|
||||||
tcg_out_tb_finalize(s);
|
tcg_out_tb_finalize(s);
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int tcg_gen_code(TCGContext *s, tcg_insn_unit *gen_code_buf) // qq
|
|
||||||
{
|
|
||||||
#ifdef CONFIG_PROFILER
|
|
||||||
{
|
|
||||||
int n;
|
|
||||||
|
|
||||||
n = s->gen_last_op_idx + 1;
|
|
||||||
s->op_count += n;
|
|
||||||
if (n > s->op_count_max) {
|
|
||||||
s->op_count_max = n;
|
|
||||||
}
|
|
||||||
|
|
||||||
n = s->nb_temps;
|
|
||||||
s->temp_count += n;
|
|
||||||
if (s->nb_temps > s->temp_count_max) {
|
|
||||||
s->temp_count_max = n;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//printf("====== before gen code\n");
|
|
||||||
//tcg_dump_ops(s);
|
|
||||||
tcg_gen_code_common(s, gen_code_buf, -1); // qq
|
|
||||||
|
|
||||||
//printf("====== after gen code\n");
|
|
||||||
//tcg_dump_ops(s);
|
|
||||||
|
|
||||||
/* flush instruction cache */
|
/* flush instruction cache */
|
||||||
flush_icache_range((uintptr_t)s->code_buf, (uintptr_t)s->code_ptr);
|
flush_icache_range((uintptr_t)s->code_buf, (uintptr_t)s->code_ptr);
|
||||||
|
@ -2487,16 +2471,6 @@ int tcg_gen_code(TCGContext *s, tcg_insn_unit *gen_code_buf) // qq
|
||||||
return tcg_current_code_size(s);
|
return tcg_current_code_size(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the index of the micro operation such as the pc after is <
|
|
||||||
offset bytes from the start of the TB. The contents of gen_code_buf must
|
|
||||||
not be changed, though writing the same values is ok.
|
|
||||||
Return -1 if not found. */
|
|
||||||
int tcg_gen_code_search_pc(TCGContext *s, tcg_insn_unit *gen_code_buf,
|
|
||||||
long offset)
|
|
||||||
{
|
|
||||||
return tcg_gen_code_common(s, gen_code_buf, offset);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_PROFILER
|
#ifdef CONFIG_PROFILER
|
||||||
void tcg_dump_info(FILE *f, fprintf_function cpu_fprintf)
|
void tcg_dump_info(FILE *f, fprintf_function cpu_fprintf)
|
||||||
{
|
{
|
||||||
|
|
|
@ -504,8 +504,6 @@ void tcg_prologue_init(TCGContext *s);
|
||||||
void tcg_func_start(TCGContext *s);
|
void tcg_func_start(TCGContext *s);
|
||||||
|
|
||||||
int tcg_gen_code(TCGContext *s, tcg_insn_unit *gen_code_buf);
|
int tcg_gen_code(TCGContext *s, tcg_insn_unit *gen_code_buf);
|
||||||
int tcg_gen_code_search_pc(TCGContext *s, tcg_insn_unit *gen_code_buf,
|
|
||||||
long offset);
|
|
||||||
|
|
||||||
void tcg_set_frame(TCGContext *s, int reg, intptr_t start, intptr_t size);
|
void tcg_set_frame(TCGContext *s, int reg, intptr_t start, intptr_t size);
|
||||||
|
|
||||||
|
|
|
@ -2761,8 +2761,6 @@
|
||||||
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_x86_64
|
#define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_x86_64
|
||||||
#define tcg_gen_callN tcg_gen_callN_x86_64
|
#define tcg_gen_callN tcg_gen_callN_x86_64
|
||||||
#define tcg_gen_code tcg_gen_code_x86_64
|
#define tcg_gen_code tcg_gen_code_x86_64
|
||||||
#define tcg_gen_code_common tcg_gen_code_common_x86_64
|
|
||||||
#define tcg_gen_code_search_pc tcg_gen_code_search_pc_x86_64
|
|
||||||
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_x86_64
|
#define tcg_gen_concat_i32_i64 tcg_gen_concat_i32_i64_x86_64
|
||||||
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_x86_64
|
#define tcg_gen_deposit_i32 tcg_gen_deposit_i32_x86_64
|
||||||
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_x86_64
|
#define tcg_gen_deposit_i64 tcg_gen_deposit_i64_x86_64
|
||||||
|
|
Loading…
Reference in a new issue