Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8f80cc1 authored by Markos Chandras's avatar Markos Chandras Committed by Ralf Baechle
Browse files

MIPS: math-emu: Allow m{f,t}hc emulation on MIPS R6



The mfhc/mthc instructions are supported on MIPS R6 so emulate
them if needed.

Signed-off-by: default avatarMarkos Chandras <markos.chandras@imgtec.com>
Cc: <stable@vger.kernel.org> # 4.0+
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10737/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 16645743
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1137,7 +1137,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
			break;
			break;


		case mfhc_op:
		case mfhc_op:
			if (!cpu_has_mips_r2)
			if (!cpu_has_mips_r2_r6)
				goto sigill;
				goto sigill;


			/* copregister rd -> gpr[rt] */
			/* copregister rd -> gpr[rt] */
@@ -1148,7 +1148,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
			break;
			break;


		case mthc_op:
		case mthc_op:
			if (!cpu_has_mips_r2)
			if (!cpu_has_mips_r2_r6)
				goto sigill;
				goto sigill;


			/* copregister rd <- gpr[rt] */
			/* copregister rd <- gpr[rt] */