Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/mips Use mips_fpexcept() instead of fpemul_tra...
details: https://anonhg.NetBSD.org/src/rev/1fdc56a1620c
branches: trunk
changeset: 762730:1fdc56a1620c
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sat Feb 26 15:41:32 2011 +0000
description:
Use mips_fpexcept() instead of fpemul_trapsignal() to deliver SIGFPE,
and remove now unused fpemul_trapsignal() introduced for PR port-mips/26410.
Fixes PR port-mips/35326 and now t_except unmasked tests in
/usr/tests/lib/libc/ieeefp pass.
Note t_subnormal double test still fails as mentioned in PR port-mips/44639.
diffstat:
sys/arch/mips/mips/fp.S | 13 ++++++-------
sys/arch/mips/mips/mips_fputrap.c | 21 +--------------------
2 files changed, 7 insertions(+), 27 deletions(-)
diffs (74 lines):
diff -r f923aae7d889 -r 1fdc56a1620c sys/arch/mips/mips/fp.S
--- a/sys/arch/mips/mips/fp.S Sat Feb 26 15:01:31 2011 +0000
+++ b/sys/arch/mips/mips/fp.S Sat Feb 26 15:41:32 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fp.S,v 1.42 2011/02/26 15:01:31 tsutsui Exp $ */
+/* $NetBSD: fp.S,v 1.43 2011/02/26 15:41:32 tsutsui Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -2833,6 +2833,7 @@
#nop
INT_S a2, PCB_FPREGS+FRAME_FSR(v0)
#endif
+ move a3, a2 # fpustat
REG_L a1, CALLFRAME_FRAME(sp) # frame
REG_L a2, CALLFRAME_CAUSE(sp) # cause
REG_L ra, CALLFRAME_RA(sp)
@@ -4572,10 +4573,9 @@
REG_S a2, TF_REG_CAUSE(a1)
REG_EPILOGUE
- move a2, a0 # code = instruction
+ move a1, a3 # fpustat
move a0, MIPS_CURLWP # get current lwp
- li a1, SIGFPE
- j _C_LABEL(fpemul_trapsignal)
+ j _C_LABEL(mips_fpuexcept)
END(fpemul_sigfpe)
#ifdef FPEMUL
@@ -4587,9 +4587,8 @@
REG_S a2, TF_REG_CAUSE(a1)
REG_EPILOGUE
- move a2, a0 # code = instruction
+ move a1, a3 # fpustat
move a0, MIPS_CURLWP # get current lwp
- li a1, SIGFPE
- j _C_LABEL(fpemul_trapsignal)
+ j _C_LABEL(mips_fpuexcept)
END(mips_emul_sigfpe)
#endif
diff -r f923aae7d889 -r 1fdc56a1620c sys/arch/mips/mips/mips_fputrap.c
--- a/sys/arch/mips/mips/mips_fputrap.c Sat Feb 26 15:01:31 2011 +0000
+++ b/sys/arch/mips/mips/mips_fputrap.c Sat Feb 26 15:41:32 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mips_fputrap.c,v 1.9 2011/02/26 11:05:54 tsutsui Exp $ */
+/* $NetBSD: mips_fputrap.c,v 1.10 2011/02/26 15:41:32 tsutsui Exp $ */
/*
* Copyright (c) 2004
@@ -99,22 +99,3 @@
return FPE_FLTINV;
}
#endif /* FPEMUL || !NOFPU */
-
-void fpemul_trapsignal(struct lwp *, unsigned int, unsigned int);
-
-void
-fpemul_trapsignal(struct lwp *l, unsigned int sig, unsigned int code)
-{
- ksiginfo_t ksi;
-
-#ifdef FPEMUL_DEBUG
- printf("%s(%x,%x,%#"PRIxREGISTER")\n",
- __func__, sig, code, l->l_md.md_utf->tf_regs[_R_PC]);
-#endif
-
- KSI_INIT_TRAP(&ksi);
- ksi.ksi_signo = sig;
- ksi.ksi_code = 1; /* XXX */
- ksi.ksi_trap = code;
- (*l->l_proc->p_emul->e_trapsignal)(l, &ksi);
-}
Home |
Main Index |
Thread Index |
Old Index