diff --git a/qemu/aarch64.h b/qemu/aarch64.h index 2a25e13e..3b70b8cb 100644 --- a/qemu/aarch64.h +++ b/qemu/aarch64.h @@ -2761,8 +2761,6 @@ #define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_aarch64 #define tcg_gen_callN tcg_gen_callN_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_deposit_i32 tcg_gen_deposit_i32_aarch64 #define tcg_gen_deposit_i64 tcg_gen_deposit_i64_aarch64 diff --git a/qemu/aarch64eb.h b/qemu/aarch64eb.h index 72663156..47329860 100644 --- a/qemu/aarch64eb.h +++ b/qemu/aarch64eb.h @@ -2761,8 +2761,6 @@ #define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_aarch64eb #define tcg_gen_callN tcg_gen_callN_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_deposit_i32 tcg_gen_deposit_i32_aarch64eb #define tcg_gen_deposit_i64 tcg_gen_deposit_i64_aarch64eb diff --git a/qemu/arm.h b/qemu/arm.h index ce7c9f54..b72a3a49 100644 --- a/qemu/arm.h +++ b/qemu/arm.h @@ -2761,8 +2761,6 @@ #define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_arm #define tcg_gen_callN tcg_gen_callN_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_deposit_i32 tcg_gen_deposit_i32_arm #define tcg_gen_deposit_i64 tcg_gen_deposit_i64_arm diff --git a/qemu/armeb.h b/qemu/armeb.h index 55ca7d95..24abe150 100644 --- a/qemu/armeb.h +++ b/qemu/armeb.h @@ -2761,8 +2761,6 @@ #define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_armeb #define tcg_gen_callN tcg_gen_callN_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_deposit_i32 tcg_gen_deposit_i32_armeb #define tcg_gen_deposit_i64 tcg_gen_deposit_i64_armeb diff --git a/qemu/header_gen.py b/qemu/header_gen.py index e6af7181..28a788b1 100644 --- a/qemu/header_gen.py +++ b/qemu/header_gen.py @@ -2767,8 +2767,6 @@ symbols = ( 'tcg_gen_bswap64_i64', 'tcg_gen_callN', 'tcg_gen_code', - 'tcg_gen_code_common', - 'tcg_gen_code_search_pc', 'tcg_gen_concat_i32_i64', 'tcg_gen_deposit_i32', 'tcg_gen_deposit_i64', diff --git a/qemu/m68k.h b/qemu/m68k.h index 4569d733..1e349af6 100644 --- a/qemu/m68k.h +++ b/qemu/m68k.h @@ -2761,8 +2761,6 @@ #define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_m68k #define tcg_gen_callN tcg_gen_callN_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_deposit_i32 tcg_gen_deposit_i32_m68k #define tcg_gen_deposit_i64 tcg_gen_deposit_i64_m68k diff --git a/qemu/mips.h b/qemu/mips.h index 5cccc103..6f818175 100644 --- a/qemu/mips.h +++ b/qemu/mips.h @@ -2761,8 +2761,6 @@ #define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_mips #define tcg_gen_callN tcg_gen_callN_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_deposit_i32 tcg_gen_deposit_i32_mips #define tcg_gen_deposit_i64 tcg_gen_deposit_i64_mips diff --git a/qemu/mips64.h b/qemu/mips64.h index 4e7f3661..24903223 100644 --- a/qemu/mips64.h +++ b/qemu/mips64.h @@ -2761,8 +2761,6 @@ #define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_mips64 #define tcg_gen_callN tcg_gen_callN_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_deposit_i32 tcg_gen_deposit_i32_mips64 #define tcg_gen_deposit_i64 tcg_gen_deposit_i64_mips64 diff --git a/qemu/mips64el.h b/qemu/mips64el.h index 32599389..11c7d5a1 100644 --- a/qemu/mips64el.h +++ b/qemu/mips64el.h @@ -2761,8 +2761,6 @@ #define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_mips64el #define tcg_gen_callN tcg_gen_callN_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_deposit_i32 tcg_gen_deposit_i32_mips64el #define tcg_gen_deposit_i64 tcg_gen_deposit_i64_mips64el diff --git a/qemu/mipsel.h b/qemu/mipsel.h index 34e3fe78..a3d75736 100644 --- a/qemu/mipsel.h +++ b/qemu/mipsel.h @@ -2761,8 +2761,6 @@ #define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_mipsel #define tcg_gen_callN tcg_gen_callN_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_deposit_i32 tcg_gen_deposit_i32_mipsel #define tcg_gen_deposit_i64 tcg_gen_deposit_i64_mipsel diff --git a/qemu/powerpc.h b/qemu/powerpc.h index b50416e5..fbed930a 100644 --- a/qemu/powerpc.h +++ b/qemu/powerpc.h @@ -2761,8 +2761,6 @@ #define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_powerpc #define tcg_gen_callN tcg_gen_callN_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_deposit_i32 tcg_gen_deposit_i32_powerpc #define tcg_gen_deposit_i64 tcg_gen_deposit_i64_powerpc diff --git a/qemu/sparc.h b/qemu/sparc.h index 55e7d967..372cf063 100644 --- a/qemu/sparc.h +++ b/qemu/sparc.h @@ -2761,8 +2761,6 @@ #define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_sparc #define tcg_gen_callN tcg_gen_callN_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_deposit_i32 tcg_gen_deposit_i32_sparc #define tcg_gen_deposit_i64 tcg_gen_deposit_i64_sparc diff --git a/qemu/sparc64.h b/qemu/sparc64.h index c0af1ea1..371afd00 100644 --- a/qemu/sparc64.h +++ b/qemu/sparc64.h @@ -2761,8 +2761,6 @@ #define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_sparc64 #define tcg_gen_callN tcg_gen_callN_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_deposit_i32 tcg_gen_deposit_i32_sparc64 #define tcg_gen_deposit_i64 tcg_gen_deposit_i64_sparc64 diff --git a/qemu/tcg/tcg.c b/qemu/tcg/tcg.c index 40436564..03b86357 100644 --- a/qemu/tcg/tcg.c +++ b/qemu/tcg/tcg.c @@ -2331,12 +2331,28 @@ static void dump_op_count(void) #endif -static inline int tcg_gen_code_common(TCGContext *s, - tcg_insn_unit *gen_code_buf, - long search_pc) +int tcg_gen_code(TCGContext *s, tcg_insn_unit *gen_code_buf) { 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 if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) { 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); break; } - if (search_pc >= 0 && (size_t)search_pc < tcg_current_code_size(s)) { - return oi; - } #ifndef NDEBUG check_regs(s); #endif @@ -2451,35 +2464,6 @@ static inline int tcg_gen_code_common(TCGContext *s, /* Generate TB finalization at the end of block */ 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_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 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 void tcg_dump_info(FILE *f, fprintf_function cpu_fprintf) { diff --git a/qemu/tcg/tcg.h b/qemu/tcg/tcg.h index a8b70a98..f9db89cd 100644 --- a/qemu/tcg/tcg.h +++ b/qemu/tcg/tcg.h @@ -504,8 +504,6 @@ void tcg_prologue_init(TCGContext *s); void tcg_func_start(TCGContext *s); 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); diff --git a/qemu/x86_64.h b/qemu/x86_64.h index 0c666dc7..c4e82b42 100644 --- a/qemu/x86_64.h +++ b/qemu/x86_64.h @@ -2761,8 +2761,6 @@ #define tcg_gen_bswap64_i64 tcg_gen_bswap64_i64_x86_64 #define tcg_gen_callN tcg_gen_callN_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_deposit_i32 tcg_gen_deposit_i32_x86_64 #define tcg_gen_deposit_i64 tcg_gen_deposit_i64_x86_64