diff options
author | Maciej W. Rozycki <macro@imgtec.com> | 2017-06-16 02:16:15 +0300 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2017-06-29 03:42:27 +0300 |
commit | 70f743d141d3b14ca904581dfd1bd50dbe685c4f (patch) | |
tree | 38bc763e1c805de7e99af460ff660663df35c4cb /arch/mips/math-emu/cp1emu.c | |
parent | 27fe2200dad2de8207a694024a7b9037dff1b280 (diff) | |
download | linux-70f743d141d3b14ca904581dfd1bd50dbe685c4f.tar.xz |
MIPS: math-emu: For MFHC1/MTHC1 also return SIGILL right away
Update commit 1ac944007bed ("MIPS: math-emu: Add mfhc1 & mthc1
support.") and like done throughout `cop1Emulate' for other cases also
for the MFHC1 and MTHC1 instructions return SIGILL right away rather
than jumping to a single `return' statement.
Signed-off-by: Maciej W. Rozycki <macro@imgtec.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/16401/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/math-emu/cp1emu.c')
-rw-r--r-- | arch/mips/math-emu/cp1emu.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c index 261915265942..f08a7b4facb9 100644 --- a/arch/mips/math-emu/cp1emu.c +++ b/arch/mips/math-emu/cp1emu.c @@ -1142,7 +1142,7 @@ emul: case mfhc_op: if (!cpu_has_mips_r2_r6) - goto sigill; + return SIGILL; /* copregister rd -> gpr[rt] */ if (MIPSInst_RT(ir) != 0) { @@ -1153,7 +1153,7 @@ emul: case mthc_op: if (!cpu_has_mips_r2_r6) - goto sigill; + return SIGILL; /* copregister rd <- gpr[rt] */ SITOHREG(xcp->regs[MIPSInst_RT(ir)], MIPSInst_RD(ir)); @@ -1376,7 +1376,6 @@ branch_common: xcp->regs[MIPSInst_RS(ir)]; break; default: -sigill: return SIGILL; } |