aboutsummaryrefslogtreecommitdiff
path: root/target/arm/helper.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-01-12 11:24:35 +0100
committerPeter Maydell <peter.maydell@linaro.org>2023-01-23 13:32:38 +0000
commitf4318557149184d6dac99e561acabcb602a84ee1 (patch)
tree1b37f89e0f831906f537371da829a67921d7bbe1 /target/arm/helper.c
parentfccb49182e23bd359092f7ab09bc7e60a0fff71a (diff)
downloadqemu-f4318557149184d6dac99e561acabcb602a84ee1.zip
qemu-f4318557149184d6dac99e561acabcb602a84ee1.tar.gz
qemu-f4318557149184d6dac99e561acabcb602a84ee1.tar.bz2
target/arm/sme: Rebuild hflags in aarch64_set_svcr()
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-7-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>
Diffstat (limited to 'target/arm/helper.c')
-rw-r--r--target/arm/helper.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/target/arm/helper.c b/target/arm/helper.c
index 564c5d9..8077967 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -6738,6 +6738,9 @@ void aarch64_set_svcr(CPUARMState *env, uint64_t new, uint64_t mask)
{
uint64_t change = (env->svcr ^ new) & mask;
+ if (change == 0) {
+ return;
+ }
env->svcr ^= change;
if (change & R_SVCR_SM_MASK) {
@@ -6755,6 +6758,8 @@ void aarch64_set_svcr(CPUARMState *env, uint64_t new, uint64_t mask)
if (change & new & R_SVCR_ZA_MASK) {
memset(env->zarray, 0, sizeof(env->zarray));
}
+
+ arm_rebuild_hflags(env);
}
static void svcr_write(CPUARMState *env, const ARMCPRegInfo *ri,
@@ -6763,7 +6768,6 @@ static void svcr_write(CPUARMState *env, const ARMCPRegInfo *ri,
helper_set_pstate_sm(env, FIELD_EX64(value, SVCR, SM));
helper_set_pstate_za(env, FIELD_EX64(value, SVCR, ZA));
aarch64_set_svcr(env, value, -1);
- arm_rebuild_hflags(env);
}
static void smcr_write(CPUARMState *env, const ARMCPRegInfo *ri,