diff options
author | Richard Henderson | 2018-10-24 08:50:17 +0200 |
---|---|---|
committer | Peter Maydell | 2018-10-24 08:51:31 +0200 |
commit | 5763190fa8705863b4b725aa1657661a97113eb4 (patch) | |
tree | ef090594f03a8f3f68272d7b796d67b5b85b22aa /target/arm/cpu.h | |
parent | target/arm: Convert sve from feature bit to aa64pfr0 test (diff) | |
download | qemu-5763190fa8705863b4b725aa1657661a97113eb4.tar.gz qemu-5763190fa8705863b4b725aa1657661a97113eb4.tar.xz qemu-5763190fa8705863b4b725aa1657661a97113eb4.zip |
target/arm: Convert v8.2-fp16 from feature bit to aa64pfr0 test
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20181016223115.24100-9-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/cpu.h')
-rw-r--r-- | target/arm/cpu.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/target/arm/cpu.h b/target/arm/cpu.h index a9e4f0560e..8e6779936e 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -1603,7 +1603,6 @@ enum arm_features { ARM_FEATURE_PMU, /* has PMU support */ ARM_FEATURE_VBAR, /* has cp15 VBAR */ ARM_FEATURE_M_SECURITY, /* M profile Security Extension */ - ARM_FEATURE_V8_FP16, /* implements v8.2 half-precision float */ ARM_FEATURE_M_MAIN, /* M profile Main Extension */ }; @@ -3213,6 +3212,16 @@ static inline bool isar_feature_aa32_dp(const ARMISARegisters *id) return FIELD_EX32(id->id_isar6, ID_ISAR6, DP) != 0; } +static inline bool isar_feature_aa32_fp16_arith(const ARMISARegisters *id) +{ + /* + * This is a placeholder for use by VCMA until the rest of + * the ARMv8.2-FP16 extension is implemented for aa32 mode. + * At which point we can properly set and check MVFR1.FPHP. + */ + return FIELD_EX64(id->id_aa64pfr0, ID_AA64PFR0, FP) == 1; +} + /* * 64-bit feature tests via id registers. */ @@ -3281,6 +3290,12 @@ static inline bool isar_feature_aa64_fcma(const ARMISARegisters *id) return FIELD_EX64(id->id_aa64isar1, ID_AA64ISAR1, FCMA) != 0; } +static inline bool isar_feature_aa64_fp16(const ARMISARegisters *id) +{ + /* We always set the AdvSIMD and FP fields identically wrt FP16. */ + return FIELD_EX64(id->id_aa64pfr0, ID_AA64PFR0, FP) == 1; +} + static inline bool isar_feature_aa64_sve(const ARMISARegisters *id) { return FIELD_EX64(id->id_aa64pfr0, ID_AA64PFR0, SVE) != 0; |