diff options
author | Peter Maydell | 2019-06-11 17:39:42 +0200 |
---|---|---|
committer | Peter Maydell | 2019-06-13 16:14:03 +0200 |
commit | b3ff4b87b4ae08120a51fe12592725e1dca8a085 (patch) | |
tree | 112b1d7ac27b9deefd12cc160c876ccdef7f724d /target/arm/cpu.h | |
parent | target/arm: Explicitly enable VFP short-vectors for aarch32 -cpu max (diff) | |
download | qemu-b3ff4b87b4ae08120a51fe12592725e1dca8a085.tar.gz qemu-b3ff4b87b4ae08120a51fe12592725e1dca8a085.tar.xz qemu-b3ff4b87b4ae08120a51fe12592725e1dca8a085.zip |
target/arm: Convert the VSEL instructions to decodetree
Convert the VSEL instructions to decodetree.
We leave trans_VSEL() in translate.c for now as this allows
the patch to show just the changes from the old handle_vsel().
In the old code the check for "do D16-D31 exist" was hidden in
the VFP_DREG macro, and assumed that VFPv3 always implied that
D16-D31 exist. In the new code we do the correct ID register test.
This gives identical behaviour for most of our CPUs, and fixes
previously incorrect handling for Cortex-R5F, Cortex-M4 and
Cortex-M33, which all implement VFPv3 or better with only 16
double-precision registers.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/arm/cpu.h')
-rw-r--r-- | target/arm/cpu.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 06ddc49eb6..dc50c86e31 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -3371,6 +3371,12 @@ static inline bool isar_feature_aa32_fp16_arith(const ARMISARegisters *id) return FIELD_EX64(id->id_aa64pfr0, ID_AA64PFR0, FP) == 1; } +static inline bool isar_feature_aa32_fp_d32(const ARMISARegisters *id) +{ + /* Return true if D16-D31 are implemented */ + return FIELD_EX64(id->mvfr0, MVFR0, SIMDREG) >= 2; +} + /* * We always set the FP and SIMD FP16 fields to indicate identical * levels of support (assuming SIMD is implemented at all), so |