diff options
Diffstat (limited to 'target-arm')
-rw-r--r-- | target-arm/op.c | 15 | ||||
-rw-r--r-- | target-arm/translate.c | 40 |
2 files changed, 5 insertions, 50 deletions
diff --git a/target-arm/op.c b/target-arm/op.c index 216944af59..c2d33ca328 100644 --- a/target-arm/op.c +++ b/target-arm/op.c @@ -364,21 +364,6 @@ void OPPROTO op_testn_T0(void) FORCE_RET(); } -void OPPROTO op_goto_tb0(void) -{ - GOTO_TB(op_goto_tb0, PARAM1, 0); -} - -void OPPROTO op_goto_tb1(void) -{ - GOTO_TB(op_goto_tb1, PARAM1, 1); -} - -void OPPROTO op_exit_tb(void) -{ - EXIT_TB(); -} - void OPPROTO op_movl_T0_cpsr(void) { /* Execution state bits always read as zero. */ diff --git a/target-arm/translate.c b/target-arm/translate.c index 513b179872..6de78f8caa 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -28,6 +28,7 @@ #include "cpu.h" #include "exec-all.h" #include "disas.h" +#include "tcg-op.h" #define ENABLE_ARCH_5J 0 #define ENABLE_ARCH_6 arm_feature(env, ARM_FEATURE_V6) @@ -68,27 +69,10 @@ typedef struct DisasContext { #define DISAS_WFI 4 #define DISAS_SWI 5 -#ifdef USE_DIRECT_JUMP -#define TBPARAM(x) -#else -#define TBPARAM(x) (long)(x) -#endif - /* XXX: move that elsewhere */ -static uint16_t *gen_opc_ptr; -static uint32_t *gen_opparam_ptr; extern FILE *logfile; extern int loglevel; -enum { -#define DEF(s, n, copy_size) INDEX_op_ ## s, -#include "opc.h" -#undef DEF - NB_OPS, -}; - -#include "gen-op.h" - #define PAS_OP(pfx) { \ gen_op_ ## pfx ## add16_T0_T1, \ gen_op_ ## pfx ## addsubx_T0_T1, \ @@ -2432,19 +2416,14 @@ static inline void gen_goto_tb(DisasContext *s, int n, uint32_t dest) tb = s->tb; if ((tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK)) { - if (n == 0) - gen_op_goto_tb0(TBPARAM(tb)); - else - gen_op_goto_tb1(TBPARAM(tb)); + tcg_gen_goto_tb(n); gen_op_movl_T0_im(dest); gen_op_movl_r15_T0(); - gen_op_movl_T0_im((long)tb + n); - gen_op_exit_tb(); + tcg_gen_exit_tb((long)tb + n); } else { gen_op_movl_T0_im(dest); gen_op_movl_r15_T0(); - gen_op_movl_T0_0(); - gen_op_exit_tb(); + tcg_gen_exit_tb(0); } } @@ -7486,9 +7465,7 @@ static inline int gen_intermediate_code_internal(CPUState *env, dc->tb = tb; - gen_opc_ptr = gen_opc_buf; gen_opc_end = gen_opc_buf + OPC_MAX_SIZE; - gen_opparam_ptr = gen_opparam_buf; dc->is_jmp = DISAS_NEXT; dc->pc = pc_start; @@ -7506,7 +7483,6 @@ static inline int gen_intermediate_code_internal(CPUState *env, } #endif next_page_start = (pc_start & TARGET_PAGE_MASK) + TARGET_PAGE_SIZE; - nb_gen_labels = 0; lj = -1; /* Reset the conditional execution bits immediately. This avoids complications trying to do it at the end of the block. */ @@ -7625,8 +7601,7 @@ static inline int gen_intermediate_code_internal(CPUState *env, case DISAS_JUMP: case DISAS_UPDATE: /* indicate that the hash table must be used to find the next TB */ - gen_op_movl_T0_0(); - gen_op_exit_tb(); + tcg_gen_exit_tb(0); break; case DISAS_TB_JUMP: /* nothing more to generate */ @@ -7654,11 +7629,6 @@ done_generating: fprintf(logfile, "IN: %s\n", lookup_symbol(pc_start)); target_disas(logfile, pc_start, dc->pc - pc_start, env->thumb); fprintf(logfile, "\n"); - if (loglevel & (CPU_LOG_TB_OP)) { - fprintf(logfile, "OP:\n"); - dump_ops(gen_opc_buf, gen_opparam_buf); - fprintf(logfile, "\n"); - } } #endif if (search_pc) { |