aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-01-12 11:24:31 +0100
committerPeter Maydell <peter.maydell@linaro.org>2023-01-23 13:32:38 +0000
commit3c9ee548948870c14235e3fa8fb235c0c1c20822 (patch)
treef234bcf76ffbced5b89a142779abd2dbbc5ed9c6
parent535ca76425fc1ffa4311b3a47518b06c596a55c6 (diff)
target/arm/sme: Rebuild hflags in set_pstate() helpers
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20230112102436.1913-3-philmd@linaro.org Message-Id: <20230112004322.161330-1-richard.henderson@linaro.org> [PMD: Split patch in multiple tiny steps] Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--target/arm/sme_helper.c2
-rw-r--r--target/arm/translate-a64.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/target/arm/sme_helper.c b/target/arm/sme_helper.c
index f891306bb9..b5aefa3eda 100644
--- a/target/arm/sme_helper.c
+++ b/target/arm/sme_helper.c
@@ -45,6 +45,7 @@ void helper_set_pstate_sm(CPUARMState *env, uint32_t i)
}
env->svcr ^= R_SVCR_SM_MASK;
arm_reset_sve_state(env);
+ arm_rebuild_hflags(env);
}
void helper_set_pstate_za(CPUARMState *env, uint32_t i)
@@ -65,6 +66,7 @@ void helper_set_pstate_za(CPUARMState *env, uint32_t i)
if (i) {
memset(env->zarray, 0, sizeof(env->zarray));
}
+ arm_rebuild_hflags(env);
}
void helper_sme_zero(CPUARMState *env, uint32_t imm, uint32_t svl)
diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
index 35cc851246..035e63bdc5 100644
--- a/target/arm/translate-a64.c
+++ b/target/arm/translate-a64.c
@@ -1855,7 +1855,6 @@ static void handle_msr_i(DisasContext *s, uint32_t insn,
if ((crm & 4) && i != s->pstate_za) {
gen_helper_set_pstate_za(cpu_env, tcg_constant_i32(i));
}
- gen_rebuild_hflags(s);
} else {
s->base.is_jmp = DISAS_NEXT;
}