[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/9] target/arm: Add isar feature check functions for MVE
From: |
Peter Maydell |
Subject: |
[PATCH 1/9] target/arm: Add isar feature check functions for MVE |
Date: |
Thu, 20 May 2021 16:28:32 +0100 |
Add the isar feature check functions we will need for v8.1M MVE:
* a check for MVE present: this corresponds to the pseudocode's
CheckDecodeFaults(ExtType_Mve)
* a check for the optional floating-point part of MVE: this
corresponds to CheckDecodeFaults(ExtType_MveFp)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/cpu.h | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index 616b3932534..d037f5530fc 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -3801,6 +3801,28 @@ static inline bool isar_feature_aa32_fp16_arith(const
ARMISARegisters *id)
}
}
+static inline bool isar_feature_aa32_mve(const ARMISARegisters *id)
+{
+ /*
+ * Return true if MVE is supported (either integer or floating point).
+ * We must check for M-profile as the MVFR1 field means something
+ * else for A-profile.
+ */
+ return isar_feature_aa32_mprofile(id) &&
+ FIELD_EX32(id->mvfr1, MVFR1, MVE) > 0;
+}
+
+static inline bool isar_feature_aa32_mve_fp(const ARMISARegisters *id)
+{
+ /*
+ * Return true if MVE is supported (either integer or floating point).
+ * We must check for M-profile as the MVFR1 field means something
+ * else for A-profile.
+ */
+ return isar_feature_aa32_mprofile(id) &&
+ FIELD_EX32(id->mvfr1, MVFR1, MVE) >= 2;
+}
+
static inline bool isar_feature_aa32_vfp_simd(const ARMISARegisters *id)
{
/*
--
2.20.1
- [PATCH 0/9] target/arm: MVE preliminaries, Peter Maydell, 2021/05/20
- [PATCH 1/9] target/arm: Add isar feature check functions for MVE,
Peter Maydell <=
- [PATCH 2/9] target/arm: Update feature checks for insns which are "MVE or FP", Peter Maydell, 2021/05/20
- [PATCH 4/9] target/arm: Add MVE check to VMOV_reg_sp and VMOV_reg_dp, Peter Maydell, 2021/05/20
- [PATCH 6/9] target/arm: Implement M-profile VPR register, Peter Maydell, 2021/05/20
- [PATCH 3/9] target/arm: Move fpsp/fpdp isar check into callers of do_vfp_2op_sp/dp, Peter Maydell, 2021/05/20
- [PATCH 7/9] target/arm: Make FPSCR.LTPSIZE writable for MVE, Peter Maydell, 2021/05/20