diff options
author | Peter Maydell | 2020-02-14 18:50:56 +0100 |
---|---|---|
committer | Peter Maydell | 2020-02-21 17:07:00 +0100 |
commit | 873b73c0c891ec20adacc7bd1ae789294334d675 (patch) | |
tree | b19b132054da9f873b9ff37e25b99f139a674e13 /target/arm/cpu.h | |
parent | target/arm: Split out aa64_va_parameter_tbi, aa64_va_parameter_tbid (diff) | |
download | qemu-873b73c0c891ec20adacc7bd1ae789294334d675.tar.gz qemu-873b73c0c891ec20adacc7bd1ae789294334d675.tar.xz qemu-873b73c0c891ec20adacc7bd1ae789294334d675.zip |
target/arm: Add _aa32_ to isar_feature functions testing 32-bit ID registers
Enforce a convention that an isar_feature function that tests a
32-bit ID register always has _aa32_ in its name, and one that
tests a 64-bit ID register always has _aa64_ in its name.
We already follow this except for three cases: thumb_div,
arm_div and jazelle, which all need _aa32_ adding.
(As noted in the comment, isar_feature_aa32_fp16_arith()
is an exception in that it currently tests ID_AA64PFR0_EL1,
but will switch to MVFR1 once we've properly implemented
FP16 for AArch32.)
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20200214175116.9164-2-peter.maydell@linaro.org
Diffstat (limited to 'target/arm/cpu.h')
-rw-r--r-- | target/arm/cpu.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/target/arm/cpu.h b/target/arm/cpu.h index e943ffe8a9..37d40e5790 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -3325,19 +3325,26 @@ static inline uint64_t *aa64_vfp_qreg(CPUARMState *env, unsigned regno) extern const uint64_t pred_esz_masks[4]; /* + * Naming convention for isar_feature functions: + * Functions which test 32-bit ID registers should have _aa32_ in + * their name. Functions which test 64-bit ID registers should have + * _aa64_ in their name. + */ + +/* * 32-bit feature tests via id registers. */ -static inline bool isar_feature_thumb_div(const ARMISARegisters *id) +static inline bool isar_feature_aa32_thumb_div(const ARMISARegisters *id) { return FIELD_EX32(id->id_isar0, ID_ISAR0, DIVIDE) != 0; } -static inline bool isar_feature_arm_div(const ARMISARegisters *id) +static inline bool isar_feature_aa32_arm_div(const ARMISARegisters *id) { return FIELD_EX32(id->id_isar0, ID_ISAR0, DIVIDE) > 1; } -static inline bool isar_feature_jazelle(const ARMISARegisters *id) +static inline bool isar_feature_aa32_jazelle(const ARMISARegisters *id) { return FIELD_EX32(id->id_isar1, ID_ISAR1, JAZELLE) != 0; } |