فهرست منبع

[POWERPC] Correct masks used in emulating some instructions

When we get an illegal instruction exception, we check to see whether
the instruction is one that we emulate for the user program.  Some of
the masks we use in checking whether the offending instruction is one
we care about didn't have the top bit set, which is the MSB of the
major opcode.  Thus some undefined opcodes could get emulated as other
(defined but unimplemented) instructions.  This corrects the masks.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras 18 سال پیش
والد
کامیت
87589f08be
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      arch/powerpc/kernel/traps.c

+ 4 - 4
arch/powerpc/kernel/traps.c

@@ -585,14 +585,14 @@ static void parse_fpe(struct pt_regs *regs)
 #define INST_MFSPR_PVR_MASK	0xfc1fffff
 #define INST_MFSPR_PVR_MASK	0xfc1fffff
 
 
 #define INST_DCBA		0x7c0005ec
 #define INST_DCBA		0x7c0005ec
-#define INST_DCBA_MASK		0x7c0007fe
+#define INST_DCBA_MASK		0xfc0007fe
 
 
 #define INST_MCRXR		0x7c000400
 #define INST_MCRXR		0x7c000400
-#define INST_MCRXR_MASK		0x7c0007fe
+#define INST_MCRXR_MASK		0xfc0007fe
 
 
 #define INST_STRING		0x7c00042a
 #define INST_STRING		0x7c00042a
-#define INST_STRING_MASK	0x7c0007fe
-#define INST_STRING_GEN_MASK	0x7c00067e
+#define INST_STRING_MASK	0xfc0007fe
+#define INST_STRING_GEN_MASK	0xfc00067e
 #define INST_LSWI		0x7c0004aa
 #define INST_LSWI		0x7c0004aa
 #define INST_LSWX		0x7c00042a
 #define INST_LSWX		0x7c00042a
 #define INST_STSWI		0x7c0005aa
 #define INST_STSWI		0x7c0005aa