diff mbox series

[5/9] target/arm: Fix return values in fp_sysreg_checks()

Message ID 20210520152840.24453-6-peter.maydell@linaro.org (mailing list archive)
State New, archived
Headers show
Series target/arm: MVE preliminaries | expand

Commit Message

Peter Maydell May 20, 2021, 3:28 p.m. UTC
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>
---
 target/arm/translate-vfp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Richard Henderson May 24, 2021, 4:36 p.m. UTC | #1
On 5/20/21 8:28 AM, Peter Maydell wrote:
> 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>
> ---
>   target/arm/translate-vfp.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
diff mbox series

Patch

diff --git a/target/arm/translate-vfp.c b/target/arm/translate-vfp.c
index ac5832a4ed5..791c4f5f70b 100644
--- a/target/arm/translate-vfp.c
+++ b/target/arm/translate-vfp.c
@@ -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: