diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-10-30 21:39:19 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-10-30 21:39:19 +0000 |
commit | c53be3347484b0f73deebcfa2e5faf538d6fa7c0 (patch) | |
tree | 6f996e28668f34c6496991c55a08dd5a32becf4e /target-arm | |
parent | d5d11eac6c853d10a9d97a279f1c69e0f0d66397 (diff) | |
download | qemu-c53be3347484b0f73deebcfa2e5faf538d6fa7c0.zip qemu-c53be3347484b0f73deebcfa2e5faf538d6fa7c0.tar.gz qemu-c53be3347484b0f73deebcfa2e5faf538d6fa7c0.tar.bz2 |
suppressed JUMP_TB (Paul Brook)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1594 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-arm')
-rw-r--r-- | target-arm/op.c | 8 | ||||
-rw-r--r-- | target-arm/translate.c | 25 |
2 files changed, 26 insertions, 7 deletions
diff --git a/target-arm/op.c b/target-arm/op.c index 8a82def7..1d30b1b 100644 --- a/target-arm/op.c +++ b/target-arm/op.c @@ -346,14 +346,14 @@ void OPPROTO op_test_le(void) FORCE_RET(); } -void OPPROTO op_jmp0(void) +void OPPROTO op_goto_tb0(void) { - JUMP_TB(op_jmp0, PARAM1, 0, PARAM2); + GOTO_TB(op_goto_tb0, PARAM1, 0); } -void OPPROTO op_jmp1(void) +void OPPROTO op_goto_tb1(void) { - JUMP_TB(op_jmp1, PARAM1, 1, PARAM2); + GOTO_TB(op_goto_tb1, PARAM1, 1); } void OPPROTO op_exit_tb(void) diff --git a/target-arm/translate.c b/target-arm/translate.c index c3e8fe8..f954de3 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -43,6 +43,12 @@ typedef struct DisasContext { #define DISAS_JUMP_NEXT 4 +#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; @@ -897,6 +903,18 @@ static int disas_vfp_insn(CPUState * env, DisasContext *s, uint32_t insn) return 0; } +static inline void gen_jmp_tb(long tb, int n, uint32_t dest) +{ + if (n == 0) + gen_op_goto_tb0(TBPARAM(tb)); + else + gen_op_goto_tb1(TBPARAM(tb)); + gen_op_movl_T0_im(dest); + gen_op_movl_r15_T0(); + gen_op_movl_T0_im(tb + n); + gen_op_exit_tb(); +} + static inline void gen_jmp (DisasContext *s, uint32_t dest) { if (__builtin_expect(s->singlestep_enabled, 0)) { @@ -906,7 +924,8 @@ static inline void gen_jmp (DisasContext *s, uint32_t dest) gen_op_movl_T0_im(dest); gen_bx(s); } else { - gen_op_jmp0((long)s->tb, dest); + long tb = (long)s->tb; + gen_jmp_tb(tb, 0, dest); s->is_jmp = DISAS_TB_JUMP; } } @@ -2118,7 +2137,7 @@ static inline int gen_intermediate_code_internal(CPUState *env, } else { switch(dc->is_jmp) { case DISAS_NEXT: - gen_op_jmp1((long)dc->tb, (long)dc->pc); + gen_jmp_tb((long)dc->tb, 1, dc->pc); break; default: case DISAS_JUMP: @@ -2133,7 +2152,7 @@ static inline int gen_intermediate_code_internal(CPUState *env, } if (dc->condjmp) { gen_set_label(dc->condlabel); - gen_op_jmp1((long)dc->tb, (long)dc->pc); + gen_jmp_tb((long)dc->tb, 1, dc->pc); dc->condjmp = 0; } } |