patch-2.4.19 linux-2.4.19/arch/mips64/kernel/branch.c

Next file: linux-2.4.19/arch/mips64/kernel/entry.S
Previous file: linux-2.4.19/arch/mips64/kernel/binfmt_elf32.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/arch/mips64/kernel/branch.c linux-2.4.19/arch/mips64/kernel/branch.c
@@ -11,6 +11,7 @@
 #include <linux/sched.h>
 #include <linux/signal.h>
 #include <asm/branch.h>
+#include <asm/cpu.h>
 #include <asm/inst.h>
 #include <asm/ptrace.h>
 #include <asm/uaccess.h>
@@ -163,7 +164,10 @@
 	 * And now the FPA/cp1 branch instructions.
 	 */
 	case cop1_op:
-		asm ("cfc1\t%0,$31":"=r" (fcr31));
+		if (!(mips_cpu.options & MIPS_CPU_FPU))
+			fcr31 = current->thread.fpu.soft.sr;
+		else
+			asm("cfc1\t%0,$31":"=r" (fcr31));
 		bit = (insn.i_format.rt >> 2);
 		bit += (bit != 0);
 		bit += 23;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)