[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/11] target/arm: Allow reading flags from FPSCR for M-profile
From: |
Peter Maydell |
Subject: |
[PULL 11/11] target/arm: Allow reading flags from FPSCR for M-profile |
Date: |
Fri, 1 Nov 2019 08:51:40 +0000 |
From: Christophe Lyon <address@hidden>
rt==15 is a special case when reading the flags: it means the
destination is APSR. This patch avoids rejecting
vmrs apsr_nzcv, fpscr
as illegal instruction.
Cc: address@hidden
Signed-off-by: Christophe Lyon <address@hidden>
Message-id: address@hidden
[PMM: updated the comment]
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
---
target/arm/translate-vfp.inc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/target/arm/translate-vfp.inc.c b/target/arm/translate-vfp.inc.c
index 9ae980bef63..85c5ef897be 100644
--- a/target/arm/translate-vfp.inc.c
+++ b/target/arm/translate-vfp.inc.c
@@ -703,9 +703,10 @@ static bool trans_VMSR_VMRS(DisasContext *s, arg_VMSR_VMRS
*a)
if (arm_dc_feature(s, ARM_FEATURE_M)) {
/*
* The only M-profile VFP vmrs/vmsr sysreg is FPSCR.
- * Writes to R15 are UNPREDICTABLE; we choose to undef.
+ * Accesses to R15 are UNPREDICTABLE; we choose to undef.
+ * (FPSCR -> r15 is a special case which writes to the PSR flags.)
*/
- if (a->rt == 15 || a->reg != ARM_VFP_FPSCR) {
+ if (a->rt == 15 && (!a->l || a->reg != ARM_VFP_FPSCR)) {
return false;
}
}
--
2.20.1
- [PULL 00/11] target-arm queue, Peter Maydell, 2019/11/01
- [PULL 02/11] tests: arm: Introduce cpu feature tests, Peter Maydell, 2019/11/01
- [PULL 03/11] target/arm: Allow SVE to be disabled via a CPU property, Peter Maydell, 2019/11/01
- [PULL 05/11] target/arm/kvm64: Add kvm_arch_get/put_sve, Peter Maydell, 2019/11/01
- [PULL 10/11] hw/arm/boot: Rebuild hflags when modifying CPUState at boot, Peter Maydell, 2019/11/01
- [PULL 06/11] target/arm/kvm64: max cpu: Enable SVE when available, Peter Maydell, 2019/11/01
- [PULL 09/11] target/arm/kvm: host cpu: Add support for sve<N> properties, Peter Maydell, 2019/11/01
- [PULL 01/11] target/arm/monitor: Introduce qmp_query_cpu_model_expansion, Peter Maydell, 2019/11/01
- [PULL 11/11] target/arm: Allow reading flags from FPSCR for M-profile,
Peter Maydell <=
- [PULL 07/11] target/arm/kvm: scratch vcpu: Preserve input kvm_vcpu_init features, Peter Maydell, 2019/11/01
- [PULL 04/11] target/arm/cpu64: max cpu: Introduce sve<N> properties, Peter Maydell, 2019/11/01
[PULL 08/11] target/arm/cpu64: max cpu: Support sve properties with KVM, Peter Maydell, 2019/11/01
Re: [PULL 00/11] target-arm queue, Peter Maydell, 2019/11/01