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

From: Markos Chandras <hidden>
Date: 2015-07-17 09:36:10
Also in: stable
Subsystem: mips, the rest · Maintainers: Thomas Bogendoerfer, Linus Torvalds

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

Cc: <redacted> # 4.0+
Signed-off-by: Markos Chandras <redacted>
---
 arch/mips/math-emu/cp1emu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c
index 712f17a2ecf2..70e88efee45b 100644
--- a/arch/mips/math-emu/cp1emu.c
+++ b/arch/mips/math-emu/cp1emu.c
@@ -1137,7 +1137,7 @@ emul:
 			break;
 
 		case mfhc_op:
-			if (!cpu_has_mips_r2)
+			if (!cpu_has_mips_r2_r6)
 				goto sigill;
 
 			/* copregister rd -> gpr[rt] */
@@ -1148,7 +1148,7 @@ emul:
 			break;
 
 		case mthc_op:
-			if (!cpu_has_mips_r2)
+			if (!cpu_has_mips_r2_r6)
 				goto sigill;
 
 			/* copregister rd <- gpr[rt] */
-- 
2.4.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help