Module Name:    src
Committed By:   tsutsui
Date:           Wed Mar 16 15:14:08 UTC 2011

Modified Files:
        src/sys/arch/mips/mips: trap.c

Log Message:
Set R_CAUSE into trapframe in curlwp before calling mips_fpu_trap()
for workaround PR port-mips/44639.

mipsX_user_gen_exception() in mipsX_subr.S (which may call
mips_fpu_trap()) doesn't set R_CAUSE in curlwp trapframe, while
mips1_use_intr() in locore_mips1.S (that may call mips_fpu_intr()) does.

All tests in tests/lib/libc/ieeefp on MIPS3 should pass now.


To generate a diff of this commit:
cvs rdiff -u -r1.228 -r1.229 src/sys/arch/mips/mips/trap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/mips/mips/trap.c
diff -u src/sys/arch/mips/mips/trap.c:1.228 src/sys/arch/mips/mips/trap.c:1.229
--- src/sys/arch/mips/mips/trap.c:1.228	Tue Mar 15 07:39:23 2011
+++ src/sys/arch/mips/mips/trap.c	Wed Mar 16 15:14:08 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.228 2011/03/15 07:39:23 matt Exp $	*/
+/*	$NetBSD: trap.c,v 1.229 2011/03/16 15:14:08 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.228 2011/03/15 07:39:23 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.229 2011/03/16 15:14:08 tsutsui Exp $");
 
 #include "opt_cputype.h"	/* which mips CPU levels do we support? */
 #include "opt_ddb.h"
@@ -619,6 +619,7 @@
 #if defined(FPEMUL)
 		mips_emul_inst(status, cause, pc, utf);
 #elif !defined(NOFPU)
+		utf->tf_regs[_R_CAUSE] = cause;
 		mips_fpu_trap(pc, utf);
 #endif
 		userret(l);

Reply via email to