Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Maciej W. Rozycki and committed by
Ralf Baechle
70f743d1 27fe2200

+2 -3
+2 -3
arch/mips/math-emu/cp1emu.c
··· 1142 1142 1143 1143 case mfhc_op: 1144 1144 if (!cpu_has_mips_r2_r6) 1145 - goto sigill; 1145 + return SIGILL; 1146 1146 1147 1147 /* copregister rd -> gpr[rt] */ 1148 1148 if (MIPSInst_RT(ir) != 0) { ··· 1153 1153 1154 1154 case mthc_op: 1155 1155 if (!cpu_has_mips_r2_r6) 1156 - goto sigill; 1156 + return SIGILL; 1157 1157 1158 1158 /* copregister rd <- gpr[rt] */ 1159 1159 SITOHREG(xcp->regs[MIPSInst_RT(ir)], MIPSInst_RD(ir)); ··· 1376 1376 xcp->regs[MIPSInst_RS(ir)]; 1377 1377 break; 1378 1378 default: 1379 - sigill: 1380 1379 return SIGILL; 1381 1380 } 1382 1381