-#if defined(TARGET_I386)
- {
- int cc_op;
-#ifdef DEBUG_DISAS
- if (loglevel) {
- int i;
- fprintf(logfile, "RESTORE:\n");
- for(i=0;i<=j; i++) {
- if (gen_opc_instr_start[i]) {
- fprintf(logfile, "0x%04x: 0x%08x\n", i, gen_opc_pc[i]);
- }
- }
- fprintf(logfile, "spc=0x%08lx j=0x%x eip=0x%lx cs_base=%lx\n",
- searched_pc, j, gen_opc_pc[j] - tb->cs_base, tb->cs_base);
- }
-#endif
- env->eip = gen_opc_pc[j] - tb->cs_base;
- cc_op = gen_opc_cc_op[j];
- if (cc_op != CC_OP_DYNAMIC)
- env->cc_op = cc_op;
- }
-#elif defined(TARGET_ARM)
- env->regs[15] = gen_opc_pc[j];
-#elif defined(TARGET_SPARC)
- env->pc = gen_opc_pc[j];
-#elif defined(TARGET_PPC)
- env->nip = gen_opc_pc[j];
+ env->icount_decr.u16.low -= gen_opc_icount[j];
+
+ restore_state_to_opc(env, tb, j);
+
+#ifdef CONFIG_PROFILER
+ s->restore_time += profile_getclock() - ti;
+ s->restore_count++;