]> git.proxmox.com Git - mirror_qemu.git/commitdiff
target/arm: Fix sve_zcr_len_for_el
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 8 Jul 2019 13:11:30 +0000 (14:11 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 8 Jul 2019 13:11:30 +0000 (14:11 +0100)
Off by one error in the EL2 and EL3 tests.  Remove the test
against EL3 entirely, since it must always be true.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20190702104732.31154-1-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/helper.c

index 2df7152a9cd14249b2692ace922bcb61e4ffafe4..20f8728be115bc6531bba406a02a752ac8d4f8c2 100644 (file)
@@ -5283,10 +5283,10 @@ uint32_t sve_zcr_len_for_el(CPUARMState *env, int el)
     if (el <= 1) {
         zcr_len = MIN(zcr_len, 0xf & (uint32_t)env->vfp.zcr_el[1]);
     }
-    if (el < 2 && arm_feature(env, ARM_FEATURE_EL2)) {
+    if (el <= 2 && arm_feature(env, ARM_FEATURE_EL2)) {
         zcr_len = MIN(zcr_len, 0xf & (uint32_t)env->vfp.zcr_el[2]);
     }
-    if (el < 3 && arm_feature(env, ARM_FEATURE_EL3)) {
+    if (arm_feature(env, ARM_FEATURE_EL3)) {
         zcr_len = MIN(zcr_len, 0xf & (uint32_t)env->vfp.zcr_el[3]);
     }
     return zcr_len;