mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
target/ppc: Remove msr_ee macro
msr_ee macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220504210541.115256-8-victor.colombo@eldorado.org.br> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
3868540f05
commit
0939b8f8df
4 changed files with 14 additions and 8 deletions
|
@ -5949,7 +5949,8 @@ static bool cpu_has_work_POWER7(CPUState *cs)
|
|||
}
|
||||
return false;
|
||||
} else {
|
||||
return msr_ee && (cs->interrupt_request & CPU_INTERRUPT_HARD);
|
||||
return FIELD_EX64(env->msr, MSR, EE) &&
|
||||
(cs->interrupt_request & CPU_INTERRUPT_HARD);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6120,7 +6121,8 @@ static bool cpu_has_work_POWER8(CPUState *cs)
|
|||
}
|
||||
return false;
|
||||
} else {
|
||||
return msr_ee && (cs->interrupt_request & CPU_INTERRUPT_HARD);
|
||||
return FIELD_EX64(env->msr, MSR, EE) &&
|
||||
(cs->interrupt_request & CPU_INTERRUPT_HARD);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6337,7 +6339,8 @@ static bool cpu_has_work_POWER9(CPUState *cs)
|
|||
}
|
||||
return false;
|
||||
} else {
|
||||
return msr_ee && (cs->interrupt_request & CPU_INTERRUPT_HARD);
|
||||
return FIELD_EX64(env->msr, MSR, EE) &&
|
||||
(cs->interrupt_request & CPU_INTERRUPT_HARD);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6551,7 +6554,8 @@ static bool cpu_has_work_POWER10(CPUState *cs)
|
|||
}
|
||||
return false;
|
||||
} else {
|
||||
return msr_ee && (cs->interrupt_request & CPU_INTERRUPT_HARD);
|
||||
return FIELD_EX64(env->msr, MSR, EE) &&
|
||||
(cs->interrupt_request & CPU_INTERRUPT_HARD);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7119,7 +7123,8 @@ static bool ppc_cpu_has_work(CPUState *cs)
|
|||
PowerPCCPU *cpu = POWERPC_CPU(cs);
|
||||
CPUPPCState *env = &cpu->env;
|
||||
|
||||
return msr_ee && (cs->interrupt_request & CPU_INTERRUPT_HARD);
|
||||
return FIELD_EX64(env->msr, MSR, EE) &&
|
||||
(cs->interrupt_request & CPU_INTERRUPT_HARD);
|
||||
}
|
||||
|
||||
static void ppc_cpu_reset(DeviceState *dev)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue