mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
target/arm: Add isar_feature_aa32_vfp_simd
Use this in the places that were checking ARM_FEATURE_VFP, and are obviously testing for the existance of the register set as opposed to testing for some particular instruction extension. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20200224222232.13807-2-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
25f1d9f38b
commit
7fbc6a403a
7 changed files with 37 additions and 26 deletions
|
@ -738,7 +738,8 @@ static uint32_t v7m_integrity_sig(CPUARMState *env, uint32_t lr)
|
|||
*/
|
||||
uint32_t sig = 0xfefa125a;
|
||||
|
||||
if (!arm_feature(env, ARM_FEATURE_VFP) || (lr & R_V7M_EXCRET_FTYPE_MASK)) {
|
||||
if (!cpu_isar_feature(aa32_vfp_simd, env_archcpu(env))
|
||||
|| (lr & R_V7M_EXCRET_FTYPE_MASK)) {
|
||||
sig |= 1;
|
||||
}
|
||||
return sig;
|
||||
|
@ -841,7 +842,7 @@ static void v7m_exception_taken(ARMCPU *cpu, uint32_t lr, bool dotailchain,
|
|||
|
||||
if (dotailchain) {
|
||||
/* Sanitize LR FType and PREFIX bits */
|
||||
if (!arm_feature(env, ARM_FEATURE_VFP)) {
|
||||
if (!cpu_isar_feature(aa32_vfp_simd, cpu)) {
|
||||
lr |= R_V7M_EXCRET_FTYPE_MASK;
|
||||
}
|
||||
lr = deposit32(lr, 24, 8, 0xff);
|
||||
|
@ -1373,7 +1374,7 @@ static void do_v7m_exception_exit(ARMCPU *cpu)
|
|||
|
||||
ftype = excret & R_V7M_EXCRET_FTYPE_MASK;
|
||||
|
||||
if (!arm_feature(env, ARM_FEATURE_VFP) && !ftype) {
|
||||
if (!ftype && !cpu_isar_feature(aa32_vfp_simd, cpu)) {
|
||||
qemu_log_mask(LOG_GUEST_ERROR, "M profile: zero FTYPE in exception "
|
||||
"exit PC value 0x%" PRIx32 " is UNPREDICTABLE "
|
||||
"if FPU not present\n",
|
||||
|
@ -2450,7 +2451,7 @@ void HELPER(v7m_msr)(CPUARMState *env, uint32_t maskreg, uint32_t val)
|
|||
* SFPA is RAZ/WI from NS. FPCA is RO if NSACR.CP10 == 0,
|
||||
* RES0 if the FPU is not present, and is stored in the S bank
|
||||
*/
|
||||
if (arm_feature(env, ARM_FEATURE_VFP) &&
|
||||
if (cpu_isar_feature(aa32_vfp_simd, env_archcpu(env)) &&
|
||||
extract32(env->v7m.nsacr, 10, 1)) {
|
||||
env->v7m.control[M_REG_S] &= ~R_V7M_CONTROL_FPCA_MASK;
|
||||
env->v7m.control[M_REG_S] |= val & R_V7M_CONTROL_FPCA_MASK;
|
||||
|
@ -2565,7 +2566,7 @@ void HELPER(v7m_msr)(CPUARMState *env, uint32_t maskreg, uint32_t val)
|
|||
env->v7m.control[env->v7m.secure] &= ~R_V7M_CONTROL_NPRIV_MASK;
|
||||
env->v7m.control[env->v7m.secure] |= val & R_V7M_CONTROL_NPRIV_MASK;
|
||||
}
|
||||
if (arm_feature(env, ARM_FEATURE_VFP)) {
|
||||
if (cpu_isar_feature(aa32_vfp_simd, env_archcpu(env))) {
|
||||
/*
|
||||
* SFPA is RAZ/WI from NS or if no FPU.
|
||||
* FPCA is RO if NSACR.CP10 == 0, RES0 if the FPU is not present.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue