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.
This commit is contained in:
parent
a75c782742
commit
72f5d65e7e
|
@ -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 @@ trap(uint32_t status, uint32_t cause, vaddr_t vaddr, vaddr_t pc,
|
|||
#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);
|
||||
|
|
Loading…
Reference in New Issue