TCG: Use gen_opc_icount from context instead of global variable.
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
		
							parent
							
								
									25983cad31
								
							
						
					
					
						commit
						c9c99c22d5
					
				@ -3414,7 +3414,7 @@ static inline void gen_intermediate_code_internal(CPUAlphaState *env,
 | 
			
		||||
            }
 | 
			
		||||
            tcg_ctx.gen_opc_pc[lj] = ctx.pc;
 | 
			
		||||
            gen_opc_instr_start[lj] = 1;
 | 
			
		||||
            gen_opc_icount[lj] = num_insns;
 | 
			
		||||
            tcg_ctx.gen_opc_icount[lj] = num_insns;
 | 
			
		||||
        }
 | 
			
		||||
        if (num_insns + 1 == max_insns && (tb->cflags & CF_LAST_IO))
 | 
			
		||||
            gen_io_start();
 | 
			
		||||
 | 
			
		||||
@ -9843,7 +9843,7 @@ static inline void gen_intermediate_code_internal(CPUARMState *env,
 | 
			
		||||
            tcg_ctx.gen_opc_pc[lj] = dc->pc;
 | 
			
		||||
            gen_opc_condexec_bits[lj] = (dc->condexec_cond << 4) | (dc->condexec_mask >> 1);
 | 
			
		||||
            gen_opc_instr_start[lj] = 1;
 | 
			
		||||
            gen_opc_icount[lj] = num_insns;
 | 
			
		||||
            tcg_ctx.gen_opc_icount[lj] = num_insns;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (num_insns + 1 == max_insns && (tb->cflags & CF_LAST_IO))
 | 
			
		||||
 | 
			
		||||
@ -3310,7 +3310,7 @@ gen_intermediate_code_internal(CPUCRISState *env, TranslationBlock *tb,
 | 
			
		||||
                tcg_ctx.gen_opc_pc[lj] = dc->pc;
 | 
			
		||||
            }
 | 
			
		||||
            gen_opc_instr_start[lj] = 1;
 | 
			
		||||
            gen_opc_icount[lj] = num_insns;
 | 
			
		||||
            tcg_ctx.gen_opc_icount[lj] = num_insns;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /* Pretty disas.  */
 | 
			
		||||
 | 
			
		||||
@ -7993,7 +7993,7 @@ static inline void gen_intermediate_code_internal(CPUX86State *env,
 | 
			
		||||
            tcg_ctx.gen_opc_pc[lj] = pc_ptr;
 | 
			
		||||
            gen_opc_cc_op[lj] = dc->cc_op;
 | 
			
		||||
            gen_opc_instr_start[lj] = 1;
 | 
			
		||||
            gen_opc_icount[lj] = num_insns;
 | 
			
		||||
            tcg_ctx.gen_opc_icount[lj] = num_insns;
 | 
			
		||||
        }
 | 
			
		||||
        if (num_insns + 1 == max_insns && (tb->cflags & CF_LAST_IO))
 | 
			
		||||
            gen_io_start();
 | 
			
		||||
 | 
			
		||||
@ -1056,7 +1056,7 @@ static void gen_intermediate_code_internal(CPULM32State *env,
 | 
			
		||||
            }
 | 
			
		||||
            tcg_ctx.gen_opc_pc[lj] = dc->pc;
 | 
			
		||||
            gen_opc_instr_start[lj] = 1;
 | 
			
		||||
            gen_opc_icount[lj] = num_insns;
 | 
			
		||||
            tcg_ctx.gen_opc_icount[lj] = num_insns;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /* Pretty disas.  */
 | 
			
		||||
 | 
			
		||||
@ -3023,7 +3023,7 @@ gen_intermediate_code_internal(CPUM68KState *env, TranslationBlock *tb,
 | 
			
		||||
            }
 | 
			
		||||
            tcg_ctx.gen_opc_pc[lj] = dc->pc;
 | 
			
		||||
            gen_opc_instr_start[lj] = 1;
 | 
			
		||||
            gen_opc_icount[lj] = num_insns;
 | 
			
		||||
            tcg_ctx.gen_opc_icount[lj] = num_insns;
 | 
			
		||||
        }
 | 
			
		||||
        if (num_insns + 1 == max_insns && (tb->cflags & CF_LAST_IO))
 | 
			
		||||
            gen_io_start();
 | 
			
		||||
 | 
			
		||||
@ -1792,7 +1792,7 @@ gen_intermediate_code_internal(CPUMBState *env, TranslationBlock *tb,
 | 
			
		||||
            }
 | 
			
		||||
            tcg_ctx.gen_opc_pc[lj] = dc->pc;
 | 
			
		||||
            gen_opc_instr_start[lj] = 1;
 | 
			
		||||
                        gen_opc_icount[lj] = num_insns;
 | 
			
		||||
                        tcg_ctx.gen_opc_icount[lj] = num_insns;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /* Pretty disas.  */
 | 
			
		||||
 | 
			
		||||
@ -15585,7 +15585,7 @@ gen_intermediate_code_internal (CPUMIPSState *env, TranslationBlock *tb,
 | 
			
		||||
            gen_opc_hflags[lj] = ctx.hflags & MIPS_HFLAG_BMASK;
 | 
			
		||||
            gen_opc_btarget[lj] = ctx.btarget;
 | 
			
		||||
            gen_opc_instr_start[lj] = 1;
 | 
			
		||||
            gen_opc_icount[lj] = num_insns;
 | 
			
		||||
            tcg_ctx.gen_opc_icount[lj] = num_insns;
 | 
			
		||||
        }
 | 
			
		||||
        if (num_insns + 1 == max_insns && (tb->cflags & CF_LAST_IO))
 | 
			
		||||
            gen_io_start();
 | 
			
		||||
 | 
			
		||||
@ -1712,7 +1712,7 @@ static inline void gen_intermediate_code_internal(OpenRISCCPU *cpu,
 | 
			
		||||
            }
 | 
			
		||||
            tcg_ctx.gen_opc_pc[k] = dc->pc;
 | 
			
		||||
            gen_opc_instr_start[k] = 1;
 | 
			
		||||
            gen_opc_icount[k] = num_insns;
 | 
			
		||||
            tcg_ctx.gen_opc_icount[k] = num_insns;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP | CPU_LOG_TB_OP_OPT))) {
 | 
			
		||||
 | 
			
		||||
@ -9684,7 +9684,7 @@ static inline void gen_intermediate_code_internal(CPUPPCState *env,
 | 
			
		||||
            }
 | 
			
		||||
            tcg_ctx.gen_opc_pc[lj] = ctx.nip;
 | 
			
		||||
            gen_opc_instr_start[lj] = 1;
 | 
			
		||||
            gen_opc_icount[lj] = num_insns;
 | 
			
		||||
            tcg_ctx.gen_opc_icount[lj] = num_insns;
 | 
			
		||||
        }
 | 
			
		||||
        LOG_DISAS("----------------\n");
 | 
			
		||||
        LOG_DISAS("nip=" TARGET_FMT_lx " super=%d ir=%d\n",
 | 
			
		||||
 | 
			
		||||
@ -5166,7 +5166,7 @@ static inline void gen_intermediate_code_internal(CPUS390XState *env,
 | 
			
		||||
            tcg_ctx.gen_opc_pc[lj] = dc.pc;
 | 
			
		||||
            gen_opc_cc_op[lj] = dc.cc_op;
 | 
			
		||||
            gen_opc_instr_start[lj] = 1;
 | 
			
		||||
            gen_opc_icount[lj] = num_insns;
 | 
			
		||||
            tcg_ctx.gen_opc_icount[lj] = num_insns;
 | 
			
		||||
        }
 | 
			
		||||
        if (num_insns + 1 == max_insns && (tb->cflags & CF_LAST_IO)) {
 | 
			
		||||
            gen_io_start();
 | 
			
		||||
 | 
			
		||||
@ -2008,7 +2008,7 @@ gen_intermediate_code_internal(CPUSH4State * env, TranslationBlock * tb,
 | 
			
		||||
            tcg_ctx.gen_opc_pc[ii] = ctx.pc;
 | 
			
		||||
            gen_opc_hflags[ii] = ctx.flags;
 | 
			
		||||
            gen_opc_instr_start[ii] = 1;
 | 
			
		||||
            gen_opc_icount[ii] = num_insns;
 | 
			
		||||
            tcg_ctx.gen_opc_icount[ii] = num_insns;
 | 
			
		||||
        }
 | 
			
		||||
        if (num_insns + 1 == max_insns && (tb->cflags & CF_LAST_IO))
 | 
			
		||||
            gen_io_start();
 | 
			
		||||
 | 
			
		||||
@ -5287,7 +5287,7 @@ static inline void gen_intermediate_code_internal(TranslationBlock * tb,
 | 
			
		||||
                tcg_ctx.gen_opc_pc[lj] = dc->pc;
 | 
			
		||||
                gen_opc_npc[lj] = dc->npc;
 | 
			
		||||
                gen_opc_instr_start[lj] = 1;
 | 
			
		||||
                gen_opc_icount[lj] = num_insns;
 | 
			
		||||
                tcg_ctx.gen_opc_icount[lj] = num_insns;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        if (num_insns + 1 == max_insns && (tb->cflags & CF_LAST_IO))
 | 
			
		||||
 | 
			
		||||
@ -2008,7 +2008,7 @@ static inline void gen_intermediate_code_internal(CPUUniCore32State *env,
 | 
			
		||||
            }
 | 
			
		||||
            tcg_ctx.gen_opc_pc[lj] = dc->pc;
 | 
			
		||||
            gen_opc_instr_start[lj] = 1;
 | 
			
		||||
            gen_opc_icount[lj] = num_insns;
 | 
			
		||||
            tcg_ctx.gen_opc_icount[lj] = num_insns;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (num_insns + 1 == max_insns && (tb->cflags & CF_LAST_IO)) {
 | 
			
		||||
 | 
			
		||||
@ -2902,7 +2902,7 @@ static void gen_intermediate_code_internal(
 | 
			
		||||
            }
 | 
			
		||||
            tcg_ctx.gen_opc_pc[lj] = dc.pc;
 | 
			
		||||
            gen_opc_instr_start[lj] = 1;
 | 
			
		||||
            gen_opc_icount[lj] = insn_count;
 | 
			
		||||
            tcg_ctx.gen_opc_icount[lj] = insn_count;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP | CPU_LOG_TB_OP_OPT))) {
 | 
			
		||||
 | 
			
		||||
@ -148,7 +148,7 @@ int cpu_restore_state(TranslationBlock *tb,
 | 
			
		||||
    /* now find start of instruction before */
 | 
			
		||||
    while (gen_opc_instr_start[j] == 0)
 | 
			
		||||
        j--;
 | 
			
		||||
    env->icount_decr.u16.low -= gen_opc_icount[j];
 | 
			
		||||
    env->icount_decr.u16.low -= s->gen_opc_icount[j];
 | 
			
		||||
 | 
			
		||||
    restore_state_to_opc(env, tb, j);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user