summaryrefslogtreecommitdiff
path: root/src/arch/arm/utility.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm/utility.hh')
-rw-r--r--src/arch/arm/utility.hh7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/arch/arm/utility.hh b/src/arch/arm/utility.hh
index 0fea44695..20cb9b426 100644
--- a/src/arch/arm/utility.hh
+++ b/src/arch/arm/utility.hh
@@ -146,7 +146,12 @@ vfpEnabled(CPACR cpacr, CPSR cpsr)
static inline bool
vfpEnabled(CPACR cpacr, CPSR cpsr, FPEXC fpexc)
{
- return fpexc.en && vfpEnabled(cpacr, cpsr);
+ if ((cpacr.cp11 == 0x3) ||
+ ((cpacr.cp11 == 0x1) && inPrivilegedMode(cpsr)))
+ return fpexc.en && vfpEnabled(cpacr, cpsr);
+ else
+ return fpexc.en && vfpEnabled(cpacr, cpsr) &&
+ (cpacr.cp11 == cpacr.cp10);
}
static inline bool