mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
generalized use of GOTO_TB() macro
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1207 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
8636b5d873
commit
ae063a68dc
3 changed files with 27 additions and 47 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue