diff options
author | Deng-Cheng Zhu <dengcheng.zhu@imgtec.com> | 2014-03-07 01:05:27 (GMT) |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-03-11 22:10:55 (GMT) |
commit | 51061b8876a3906aa5bf173582f180596f9d6455 (patch) | |
tree | 7a205930a8ae780f2d04a47865dcb4d595a0d075 /arch/mips/math-emu | |
parent | 031365b471e3268e3b8d6991b2cf0bae6b5e8bdc (diff) | |
download | linux-51061b8876a3906aa5bf173582f180596f9d6455.tar.xz |
MIPS: math-emu: Fix prefx detection and COP1X function field definition
When running applications which contain the instruction "prefx" on FPU-less
CPUs, a message "Illegal instruction" will be seen. This instruction is
supposed to be ignored by the FPU emulator. However, its current detection
and function field encoding are incorrect. This patch fix the issue.
Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
Reviewed-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Reviewed-by: Paul Burton <paul.burton@imgtec.com>
Acked-by: David Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Cc: Steven.Hill@imgtec.com
Patchwork: https://patchwork.linux-mips.org/patch/6608/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/math-emu')
-rw-r--r-- | arch/mips/math-emu/cp1emu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c index 506925b..0b4e2e3 100644 --- a/arch/mips/math-emu/cp1emu.c +++ b/arch/mips/math-emu/cp1emu.c @@ -1538,10 +1538,10 @@ static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, break; } - case 0x7: /* 7 */ - if (MIPSInst_FUNC(ir) != pfetch_op) { + case 0x3: + if (MIPSInst_FUNC(ir) != pfetch_op) return SIGILL; - } + /* ignore prefx operation */ break; |