[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/1] target/arm: Allow reading flags from FPSCR for M-profile
From: |
Christophe Lyon |
Subject: |
[PATCH 1/1] target/arm: Allow reading flags from FPSCR for M-profile |
Date: |
Fri, 25 Oct 2019 11:57:11 +0200 |
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.
Signed-off-by: Christophe Lyon <address@hidden>
---
target/arm/translate-vfp.inc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/arm/translate-vfp.inc.c b/target/arm/translate-vfp.inc.c
index 9ae980b..82bed5b 100644
--- a/target/arm/translate-vfp.inc.c
+++ b/target/arm/translate-vfp.inc.c
@@ -705,7 +705,7 @@ static bool trans_VMSR_VMRS(DisasContext *s, arg_VMSR_VMRS
*a)
* The only M-profile VFP vmrs/vmsr sysreg is FPSCR.
* Writes to R15 are UNPREDICTABLE; we choose to undef.
*/
- if (a->rt == 15 || a->reg != ARM_VFP_FPSCR) {
+ if (a->rt == 15 && (!a->l || a->reg != ARM_VFP_FPSCR)) {
return false;
}
}
--
2.7.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH 1/1] target/arm: Allow reading flags from FPSCR for M-profile,
Christophe Lyon <=