generalized use of GOTO_TB() macro


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1207 c046a42c-6fe2-441c-8c8c-71466251a162
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 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 @@
         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 @@
         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();