mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
target/mips: Clean up local variable shadowing
Fix: target/mips/tcg/nanomips_translate.c.inc:4410:33: error: declaration shadows a local variable [-Werror,-Wshadow] int32_t imm = extract32(ctx->opcode, 1, 13) | ^ target/mips/tcg/nanomips_translate.c.inc:3577:9: note: previous declaration is here int imm; ^ target/mips/tcg/translate.c:15578:19: error: declaration shadows a local variable [-Werror,-Wshadow] for (unsigned i = 1; i < 32; i++) { ^ target/mips/tcg/translate.c:15567:9: note: previous declaration is here int i; ^ target/mips/tcg/msa_helper.c:7478:13: error: declaration shadows a local variable [-Werror,-Wshadow] MSA_FLOAT_MAXOP(pwx->w[0], min, pws->w[0], pws->w[0], 32); ^ target/mips/tcg/msa_helper.c:7434:23: note: expanded from macro 'MSA_FLOAT_MAXOP' float_status *status = &env->active_tc.msa_fp_status; ^ Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20230904161235.84651-5-philmd@linaro.org> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
5a3d2c3562
commit
92e0ef7d90
3 changed files with 10 additions and 12 deletions
|
@ -15564,10 +15564,8 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_insns,
|
|||
|
||||
void mips_tcg_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
cpu_gpr[0] = NULL;
|
||||
for (i = 1; i < 32; i++)
|
||||
for (unsigned i = 1; i < 32; i++)
|
||||
cpu_gpr[i] = tcg_global_mem_new(cpu_env,
|
||||
offsetof(CPUMIPSState,
|
||||
active_tc.gpr[i]),
|
||||
|
@ -15584,7 +15582,7 @@ void mips_tcg_init(void)
|
|||
rname);
|
||||
}
|
||||
#endif /* !TARGET_MIPS64 */
|
||||
for (i = 0; i < 32; i++) {
|
||||
for (unsigned i = 0; i < 32; i++) {
|
||||
int off = offsetof(CPUMIPSState, active_fpu.fpr[i].wr.d[0]);
|
||||
|
||||
fpu_f64[i] = tcg_global_mem_new_i64(cpu_env, off, fregnames[i]);
|
||||
|
@ -15592,7 +15590,7 @@ void mips_tcg_init(void)
|
|||
msa_translate_init();
|
||||
cpu_PC = tcg_global_mem_new(cpu_env,
|
||||
offsetof(CPUMIPSState, active_tc.PC), "PC");
|
||||
for (i = 0; i < MIPS_DSP_ACC; i++) {
|
||||
for (unsigned i = 0; i < MIPS_DSP_ACC; i++) {
|
||||
cpu_HI[i] = tcg_global_mem_new(cpu_env,
|
||||
offsetof(CPUMIPSState, active_tc.HI[i]),
|
||||
regnames_HI[i]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue