]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
target/arm: Fix return values in fp_sysreg_checks()
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 20 May 2021 15:28:36 +0000 (16:28 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 3 Jun 2021 15:43:25 +0000 (16:43 +0100)
The fp_sysreg_checks() function is supposed to be returning an
FPSysRegCheckResult, which is an enum with three possible values.
However, three places in the function "return false" (a hangover from
a previous iteration of the design where the function just returned a
bool).  Make these return FPSysRegCheckFailed instead (for no
functional change, since both false and FPSysRegCheckFailed are
zero).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210520152840.24453-6-peter.maydell@linaro.org

target/arm/translate-vfp.c

index ac5832a4ed53e7e0504f60789977640eea63dc1b..791c4f5f70bd143b2b63fdbbd0a6937e331aecae 100644 (file)
@@ -691,16 +691,16 @@ static FPSysRegCheckResult fp_sysreg_checks(DisasContext *s, int regno)
         break;
     case ARM_VFP_FPSCR_NZCVQC:
         if (!arm_dc_feature(s, ARM_FEATURE_V8_1M)) {
-            return false;
+            return FPSysRegCheckFailed;
         }
         break;
     case ARM_VFP_FPCXT_S:
     case ARM_VFP_FPCXT_NS:
         if (!arm_dc_feature(s, ARM_FEATURE_V8_1M)) {
-            return false;
+            return FPSysRegCheckFailed;
         }
         if (!s->v8m_secure) {
-            return false;
+            return FPSysRegCheckFailed;
         }
         break;
     default: