]> git.baikalelectronics.ru Git - kernel.git/commitdiff
MIPS: math-emu: For MFHC1/MTHC1 also return SIGILL right away
authorMaciej W. Rozycki <macro@imgtec.com>
Thu, 15 Jun 2017 23:16:15 +0000 (00:16 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 29 Jun 2017 00:42:27 +0000 (02:42 +0200)
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>
arch/mips/math-emu/cp1emu.c

index 261915265942a3ff51b6ab4065c5d3c8426ae280..f08a7b4facb9d2011d045030e58cef82e49d4fdb 100644 (file)
@@ -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;
        }