mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 11:39:53 +00:00
Remove unused function parameters from gen_pc_load and rename the function
Function gen_pc_load was introduced in commitd2856f1ad4
. The only reason for parameter searched_pc was a debug statement in target-i386/translate.c. Parameter puc was needed by target-sparc until commitd7da2a1040
. Remove searched_pc from the debug statement and remove both parameters from the parameter list of gen_pc_load. As the function name gen_pc_load was also misleading, it is now called restore_state_to_opc. This new name was suggested by Peter Maydell, thanks. v2: Remove last parameter, too, and rename the function. v3: Fix [] typo in target-arm/translate.c. Fix wrong SHA1 object name in commit message (copy+paste error). Cc: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
This commit is contained in:
parent
8d5192ee15
commit
e87b7cb0f0
@ -77,8 +77,8 @@ extern uint16_t gen_opc_icount[OPC_BUF_SIZE];
|
||||
|
||||
void gen_intermediate_code(CPUState *env, struct TranslationBlock *tb);
|
||||
void gen_intermediate_code_pc(CPUState *env, struct TranslationBlock *tb);
|
||||
void gen_pc_load(CPUState *env, struct TranslationBlock *tb,
|
||||
unsigned long searched_pc, int pc_pos, void *puc);
|
||||
void restore_state_to_opc(CPUState *env, struct TranslationBlock *tb,
|
||||
int pc_pos);
|
||||
|
||||
void cpu_gen_init(void);
|
||||
int cpu_gen_code(CPUState *env, struct TranslationBlock *tb,
|
||||
|
@ -3367,8 +3367,7 @@ CPUAlphaState * cpu_alpha_init (const char *cpu_model)
|
||||
return env;
|
||||
}
|
||||
|
||||
void gen_pc_load(CPUState *env, TranslationBlock *tb,
|
||||
unsigned long searched_pc, int pc_pos, void *puc)
|
||||
void restore_state_to_opc(CPUState *env, TranslationBlock *tb, int pc_pos)
|
||||
{
|
||||
env->pc = gen_opc_pc[pc_pos];
|
||||
}
|
||||
|
@ -9551,8 +9551,8 @@ static inline void gen_intermediate_code_internal(CPUState *env,
|
||||
* This is handled in the same way as restoration of the
|
||||
* PC in these situations: we will be called again with search_pc=1
|
||||
* and generate a mapping of the condexec bits for each PC in
|
||||
* gen_opc_condexec_bits[]. gen_pc_load[] then uses this to restore
|
||||
* the condexec bits.
|
||||
* gen_opc_condexec_bits[]. restore_state_to_opc() then uses
|
||||
* this to restore the condexec bits.
|
||||
*
|
||||
* Note that there are no instructions which can read the condexec
|
||||
* bits, and none which can write non-static values to them, so
|
||||
@ -9817,8 +9817,7 @@ void cpu_dump_state(CPUState *env, FILE *f, fprintf_function cpu_fprintf,
|
||||
#endif
|
||||
}
|
||||
|
||||
void gen_pc_load(CPUState *env, TranslationBlock *tb,
|
||||
unsigned long searched_pc, int pc_pos, void *puc)
|
||||
void restore_state_to_opc(CPUState *env, TranslationBlock *tb, int pc_pos)
|
||||
{
|
||||
env->regs[15] = gen_opc_pc[pc_pos];
|
||||
env->condexec_bits = gen_opc_condexec_bits[pc_pos];
|
||||
|
@ -3604,8 +3604,7 @@ void cpu_reset (CPUCRISState *env)
|
||||
#endif
|
||||
}
|
||||
|
||||
void gen_pc_load(CPUState *env, struct TranslationBlock *tb,
|
||||
unsigned long searched_pc, int pc_pos, void *puc)
|
||||
void restore_state_to_opc(CPUState *env, TranslationBlock *tb, int pc_pos)
|
||||
{
|
||||
env->pc = gen_opc_pc[pc_pos];
|
||||
}
|
||||
|
@ -7890,8 +7890,7 @@ void gen_intermediate_code_pc(CPUState *env, TranslationBlock *tb)
|
||||
gen_intermediate_code_internal(env, tb, 1);
|
||||
}
|
||||
|
||||
void gen_pc_load(CPUState *env, TranslationBlock *tb,
|
||||
unsigned long searched_pc, int pc_pos, void *puc)
|
||||
void restore_state_to_opc(CPUState *env, TranslationBlock *tb, int pc_pos)
|
||||
{
|
||||
int cc_op;
|
||||
#ifdef DEBUG_DISAS
|
||||
@ -7903,8 +7902,8 @@ void gen_pc_load(CPUState *env, TranslationBlock *tb,
|
||||
qemu_log("0x%04x: " TARGET_FMT_lx "\n", i, gen_opc_pc[i]);
|
||||
}
|
||||
}
|
||||
qemu_log("spc=0x%08lx pc_pos=0x%x eip=" TARGET_FMT_lx " cs_base=%x\n",
|
||||
searched_pc, pc_pos, gen_opc_pc[pc_pos] - tb->cs_base,
|
||||
qemu_log("pc_pos=0x%x eip=" TARGET_FMT_lx " cs_base=%x\n",
|
||||
pc_pos, gen_opc_pc[pc_pos] - tb->cs_base,
|
||||
(uint32_t)tb->cs_base);
|
||||
}
|
||||
#endif
|
||||
|
@ -1212,8 +1212,7 @@ void cpu_dump_state(CPUState *env, FILE *f, fprintf_function cpu_fprintf,
|
||||
cpu_fprintf(f, "\n\n");
|
||||
}
|
||||
|
||||
void gen_pc_load(CPUState *env, struct TranslationBlock *tb,
|
||||
unsigned long searched_pc, int pc_pos, void *puc)
|
||||
void restore_state_to_opc(CPUState *env, TranslationBlock *tb, int pc_pos)
|
||||
{
|
||||
env->pc = gen_opc_pc[pc_pos];
|
||||
}
|
||||
|
@ -3113,8 +3113,7 @@ void cpu_dump_state(CPUState *env, FILE *f, fprintf_function cpu_fprintf,
|
||||
cpu_fprintf (f, "FPRESULT = %12g\n", *(double *)&env->fp_result);
|
||||
}
|
||||
|
||||
void gen_pc_load(CPUState *env, TranslationBlock *tb,
|
||||
unsigned long searched_pc, int pc_pos, void *puc)
|
||||
void restore_state_to_opc(CPUState *env, TranslationBlock *tb, int pc_pos)
|
||||
{
|
||||
env->pc = gen_opc_pc[pc_pos];
|
||||
}
|
||||
|
@ -1940,8 +1940,7 @@ void cpu_reset (CPUState *env)
|
||||
#endif
|
||||
}
|
||||
|
||||
void gen_pc_load(CPUState *env, struct TranslationBlock *tb,
|
||||
unsigned long searched_pc, int pc_pos, void *puc)
|
||||
void restore_state_to_opc(CPUState *env, TranslationBlock *tb, int pc_pos)
|
||||
{
|
||||
env->sregs[SR_PC] = gen_opc_pc[pc_pos];
|
||||
}
|
||||
|
@ -12737,8 +12737,7 @@ void cpu_reset (CPUMIPSState *env)
|
||||
env->exception_index = EXCP_NONE;
|
||||
}
|
||||
|
||||
void gen_pc_load(CPUState *env, TranslationBlock *tb,
|
||||
unsigned long searched_pc, int pc_pos, void *puc)
|
||||
void restore_state_to_opc(CPUState *env, TranslationBlock *tb, int pc_pos)
|
||||
{
|
||||
env->active_tc.PC = gen_opc_pc[pc_pos];
|
||||
env->hflags &= ~MIPS_HFLAG_BMASK;
|
||||
|
@ -9367,8 +9367,7 @@ void gen_intermediate_code_pc (CPUState *env, struct TranslationBlock *tb)
|
||||
gen_intermediate_code_internal(env, tb, 1);
|
||||
}
|
||||
|
||||
void gen_pc_load(CPUState *env, TranslationBlock *tb,
|
||||
unsigned long searched_pc, int pc_pos, void *puc)
|
||||
void restore_state_to_opc(CPUState *env, TranslationBlock *tb, int pc_pos)
|
||||
{
|
||||
env->nip = gen_opc_pc[pc_pos];
|
||||
}
|
||||
|
@ -54,8 +54,7 @@ void gen_intermediate_code_pc (CPUState *env, struct TranslationBlock *tb)
|
||||
{
|
||||
}
|
||||
|
||||
void gen_pc_load(CPUState *env, TranslationBlock *tb,
|
||||
unsigned long searched_pc, int pc_pos, void *puc)
|
||||
void restore_state_to_opc(CPUState *env, TranslationBlock *tb, int pc_pos)
|
||||
{
|
||||
env->psw.addr = gen_opc_pc[pc_pos];
|
||||
}
|
||||
|
@ -2069,8 +2069,7 @@ void gen_intermediate_code_pc(CPUState * env, struct TranslationBlock *tb)
|
||||
gen_intermediate_code_internal(env, tb, 1);
|
||||
}
|
||||
|
||||
void gen_pc_load(CPUState *env, TranslationBlock *tb,
|
||||
unsigned long searched_pc, int pc_pos, void *puc)
|
||||
void restore_state_to_opc(CPUState *env, TranslationBlock *tb, int pc_pos)
|
||||
{
|
||||
env->pc = gen_opc_pc[pc_pos];
|
||||
env->flags = gen_opc_hflags[pc_pos];
|
||||
|
@ -5080,8 +5080,7 @@ void gen_intermediate_code_init(CPUSPARCState *env)
|
||||
}
|
||||
}
|
||||
|
||||
void gen_pc_load(CPUState *env, TranslationBlock *tb,
|
||||
unsigned long searched_pc, int pc_pos, void *puc)
|
||||
void restore_state_to_opc(CPUState *env, TranslationBlock *tb, int pc_pos)
|
||||
{
|
||||
target_ulong npc;
|
||||
env->pc = gen_opc_pc[pc_pos];
|
||||
|
@ -2098,8 +2098,7 @@ void cpu_dump_state(CPUState *env, FILE *f, fprintf_function cpu_fprintf,
|
||||
#endif
|
||||
}
|
||||
|
||||
void gen_pc_load(CPUState *env, TranslationBlock *tb,
|
||||
unsigned long searched_pc, int pc_pos, void *puc)
|
||||
void restore_state_to_opc(CPUState *env, TranslationBlock *tb, int pc_pos)
|
||||
{
|
||||
env->regs[31] = gen_opc_pc[pc_pos];
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ int cpu_restore_state(TranslationBlock *tb,
|
||||
j--;
|
||||
env->icount_decr.u16.low -= gen_opc_icount[j];
|
||||
|
||||
gen_pc_load(env, tb, searched_pc, j, puc);
|
||||
restore_state_to_opc(env, tb, j);
|
||||
|
||||
#ifdef CONFIG_PROFILER
|
||||
s->restore_time += profile_getclock() - ti;
|
||||
|
Loading…
Reference in New Issue
Block a user