aboutsummaryrefslogtreecommitdiff
path: root/linux-user/arm/nwfpe/fpa11.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user/arm/nwfpe/fpa11.c')
-rw-r--r--linux-user/arm/nwfpe/fpa11.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/linux-user/arm/nwfpe/fpa11.c b/linux-user/arm/nwfpe/fpa11.c
index 441e3b1cf6..f6f8163eab 100644
--- a/linux-user/arm/nwfpe/fpa11.c
+++ b/linux-user/arm/nwfpe/fpa11.c
@@ -137,8 +137,17 @@ unsigned int EmulateAll(unsigned int opcode, FPA11* qfpa, CPUARMState* qregs)
unsigned int nRc = 0;
// unsigned long flags;
FPA11 *fpa11;
+ unsigned int cp;
// save_flags(flags); sti();
+ /* Check that this is really an FPA11 instruction: the coprocessor
+ * field in bits [11:8] must be 1 or 2.
+ */
+ cp = (opcode >> 8) & 0xf;
+ if (cp != 1 && cp != 2) {
+ return 0;
+ }
+
qemufpa=qfpa;
user_registers=qregs;