mirror of https://github.com/xemu-project/xemu.git
target/mips: Simplify msa_reset()
Call msa_reset() unconditionally, but only reset the MSA registers if MSA is implemented. Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Message-Id: <20201208003702.4088927-3-f4bug@amsat.org>
This commit is contained in:
parent
25a1362875
commit
72f31f60f8
|
@ -978,6 +978,10 @@ static void mvp_init(CPUMIPSState *env)
|
|||
|
||||
static void msa_reset(CPUMIPSState *env)
|
||||
{
|
||||
if (!ase_msa_available(env)) {
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
/* MSA access enabled */
|
||||
env->CP0_Config5 |= 1 << CP0C5_MSAEn;
|
||||
|
|
|
@ -532,10 +532,7 @@ static void mips_cpu_reset(DeviceState *dev)
|
|||
env->hflags |= MIPS_HFLAG_M16;
|
||||
}
|
||||
|
||||
/* MSA */
|
||||
if (ase_msa_available(env)) {
|
||||
msa_reset(env);
|
||||
}
|
||||
msa_reset(env);
|
||||
|
||||
compute_hflags(env);
|
||||
restore_fp_status(env);
|
||||
|
|
Loading…
Reference in New Issue