diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-01-09 00:07:04 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-01-09 00:07:04 +0000 |
commit | ae063a68dc39f2ee1c87ea2a41c468ba7256acbb (patch) | |
tree | 9832d6a60bb48403fc961ca0636fd421ea4824ed /target-i386 | |
parent | 8636b5d873d6fa5696385da80ddd5f03e1a5de4c (diff) | |
download | hqemu-ae063a68dc39f2ee1c87ea2a41c468ba7256acbb.zip hqemu-ae063a68dc39f2ee1c87ea2a41c468ba7256acbb.tar.gz |
generalized use of GOTO_TB() macro
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1207 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386')
-rw-r--r-- | target-i386/op.c | 4 | ||||
-rw-r--r-- | target-i386/translate.c | 14 |
2 files changed, 12 insertions, 6 deletions
diff --git a/target-i386/op.c b/target-i386/op.c index 1009825..ab7501e 100644 --- a/target-i386/op.c +++ b/target-i386/op.c @@ -1262,12 +1262,12 @@ void OPPROTO op_clts(void) void OPPROTO op_goto_tb0(void) { - GOTO_TB(op_goto_tb0, 0); + GOTO_TB(op_goto_tb0, PARAM1, 0); } void OPPROTO op_goto_tb1(void) { - GOTO_TB(op_goto_tb1, 1); + GOTO_TB(op_goto_tb1, PARAM1, 1); } void OPPROTO op_jmp_label(void) diff --git a/target-i386/translate.c b/target-i386/translate.c index adcdaed..bd141ff 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -61,6 +61,12 @@ static uint32_t *gen_opparam_ptr; static int x86_64_hregs; #endif +#ifdef USE_DIRECT_JUMP +#define TBPARAM(x) +#else +#define TBPARAM(x) (long)(x) +#endif + typedef struct DisasContext { /* current insn context */ int override; /* -1 if no override */ @@ -1782,13 +1788,13 @@ static inline void gen_jcc(DisasContext *s, int b, l1 = gen_new_label(); func(l1); - gen_op_goto_tb0(); + gen_op_goto_tb0(TBPARAM(tb)); gen_jmp_im(next_eip); gen_op_movl_T0_im((long)tb + 0); gen_op_exit_tb(); gen_set_label(l1); - gen_op_goto_tb1(); + gen_op_goto_tb1(TBPARAM(tb)); gen_jmp_im(val); gen_op_movl_T0_im((long)tb + 1); gen_op_exit_tb(); @@ -2179,9 +2185,9 @@ static void gen_jmp_tb(DisasContext *s, target_ulong eip, int tb_num) if (s->cc_op != CC_OP_DYNAMIC) gen_op_set_cc_op(s->cc_op); if (tb_num) - gen_op_goto_tb1(); + gen_op_goto_tb1(TBPARAM(tb)); else - gen_op_goto_tb0(); + gen_op_goto_tb0(TBPARAM(tb)); gen_jmp_im(eip); gen_op_movl_T0_im((long)tb + tb_num); gen_op_exit_tb(); |