diff options
author | Paul Mackerras <paulus@samba.org> | 2006-08-23 02:58:39 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-08-23 02:58:39 -0400 |
commit | 87589f08beaec3e1f8a3af0c72406c845f706821 (patch) | |
tree | 4402e8dc8fa204c0484fe0741eb09710f2be5bab /arch/powerpc/kernel/traps.c | |
parent | be9633e96a9e33ab97776bb6874244fa4db6987d (diff) |
[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>
Diffstat (limited to 'arch/powerpc/kernel/traps.c')
-rw-r--r-- | arch/powerpc/kernel/traps.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 125761aaa40b..4d0b4e74d579 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -585,14 +585,14 @@ static void parse_fpe(struct pt_regs *regs) | |||
585 | #define INST_MFSPR_PVR_MASK 0xfc1fffff | 585 | #define INST_MFSPR_PVR_MASK 0xfc1fffff |
586 | 586 | ||
587 | #define INST_DCBA 0x7c0005ec | 587 | #define INST_DCBA 0x7c0005ec |
588 | #define INST_DCBA_MASK 0x7c0007fe | 588 | #define INST_DCBA_MASK 0xfc0007fe |
589 | 589 | ||
590 | #define INST_MCRXR 0x7c000400 | 590 | #define INST_MCRXR 0x7c000400 |
591 | #define INST_MCRXR_MASK 0x7c0007fe | 591 | #define INST_MCRXR_MASK 0xfc0007fe |
592 | 592 | ||
593 | #define INST_STRING 0x7c00042a | 593 | #define INST_STRING 0x7c00042a |
594 | #define INST_STRING_MASK 0x7c0007fe | 594 | #define INST_STRING_MASK 0xfc0007fe |
595 | #define INST_STRING_GEN_MASK 0x7c00067e | 595 | #define INST_STRING_GEN_MASK 0xfc00067e |
596 | #define INST_LSWI 0x7c0004aa | 596 | #define INST_LSWI 0x7c0004aa |
597 | #define INST_LSWX 0x7c00042a | 597 | #define INST_LSWX 0x7c00042a |
598 | #define INST_STSWI 0x7c0005aa | 598 | #define INST_STSWI 0x7c0005aa |