Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3]: src/sys/arch/mips Pull up following revision(s) (requested by...



details:   https://anonhg.NetBSD.org/src/rev/2b664bbb81ba
branches:  netbsd-3
changeset: 577959:2b664bbb81ba
user:      tron <tron%NetBSD.org@localhost>
date:      Wed Apr 19 15:49:13 2006 +0000

description:
Pull up following revision(s) (requested by tsutsui in ticket #1260):
        sys/arch/mips/mips/fp.S: revision 1.31
        sys/arch/mips/mips/mips_fputrap.c: revision 1.3
        sys/arch/mips/conf/files.mips: revision 1.54
Update FPE trapsignal functions for new siginfo,
based on a patch provided by Matthias Drochner.
Ok'ed by christos, and fixes PR port-mips/26410.

diffstat:

 sys/arch/mips/conf/files.mips     |   4 ++--
 sys/arch/mips/mips/fp.S           |   8 ++++----
 sys/arch/mips/mips/mips_fputrap.c |  20 +++++++++++++++++++-
 3 files changed, 25 insertions(+), 7 deletions(-)

diffs (91 lines):

diff -r f6f0d009d997 -r 2b664bbb81ba sys/arch/mips/conf/files.mips
--- a/sys/arch/mips/conf/files.mips     Wed Apr 19 15:39:06 2006 +0000
+++ b/sys/arch/mips/conf/files.mips     Wed Apr 19 15:49:13 2006 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.mips,v 1.51 2005/01/24 10:03:57 drochner Exp $
+#      $NetBSD: files.mips,v 1.51.6.1 2006/04/19 15:49:13 tron Exp $
 #
 
 defflag        opt_cputype.h           NOFPU
@@ -53,7 +53,7 @@
 file   arch/mips/mips/in_cksum.c               inet
 file   netns/ns_cksum.c                        ns
 
-file   arch/mips/mips/mips_fputrap.c           !softfloat & !nofpu
+file   arch/mips/mips/mips_fputrap.c           softfloat | !nofpu
 file   arch/mips/mips/mips_emul.c
 file   arch/mips/mips/fp.S                     softfloat | !nofpu
 
diff -r f6f0d009d997 -r 2b664bbb81ba sys/arch/mips/mips/fp.S
--- a/sys/arch/mips/mips/fp.S   Wed Apr 19 15:39:06 2006 +0000
+++ b/sys/arch/mips/mips/fp.S   Wed Apr 19 15:49:13 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fp.S,v 1.28.14.1 2006/04/19 15:39:06 tron Exp $        */
+/*     $NetBSD: fp.S,v 1.28.14.2 2006/04/19 15:49:13 tron Exp $        */
 
 /*
  * Copyright (c) 1992, 1993
@@ -4967,7 +4967,7 @@
        move    a2, a0                          # code = instruction
        lw      a0, _C_LABEL(curlwp)            # get current process
        li      a1, SIGILL
-       j       _C_LABEL(trapsignal)
+       j       _C_LABEL(fpemul_trapsignal)
 END(fpemul_sigill)
 
 STATIC_LEAF(fpemul_sigfpe)
@@ -4981,7 +4981,7 @@
        move    a2, a0                          # code = instruction
        lw      a0, _C_LABEL(curlwp)            # get current process
        li      a1, SIGFPE
-       j       _C_LABEL(trapsignal)
+       j       _C_LABEL(fpemul_trapsignal)
 END(fpemul_sigfpe)
 
 #ifdef SOFTFLOAT
@@ -4996,6 +4996,6 @@
        move    a2, a0                          # code = instruction
        lw      a0, _C_LABEL(curlwp)            # get current process
        li      a1, SIGFPE
-       j       _C_LABEL(trapsignal)
+       j       _C_LABEL(fpemul_trapsignal)
 END(bcemul_sigfpe)
 #endif
diff -r f6f0d009d997 -r 2b664bbb81ba sys/arch/mips/mips/mips_fputrap.c
--- a/sys/arch/mips/mips/mips_fputrap.c Wed Apr 19 15:39:06 2006 +0000
+++ b/sys/arch/mips/mips/mips_fputrap.c Wed Apr 19 15:49:13 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mips_fputrap.c,v 1.1 2004/03/04 20:17:01 drochner Exp $ */
+/* $NetBSD: mips_fputrap.c,v 1.1.16.1 2006/04/19 15:49:13 tron Exp $ */
 
 /*
  * Copyright (c) 2004
@@ -33,6 +33,7 @@
 #include <sys/siginfo.h>
 #include <mips/cpuregs.h>
 
+#ifndef SOFTFLOAT
 void mips_fpuexcept(struct lwp *, unsigned int);
 void mips_fpuillinst(struct lwp *, unsigned int, unsigned long);
 static int fpustat2sicode(unsigned int);
@@ -84,3 +85,20 @@
                        return (fpecodes[i].code);
        return (FPE_FLTINV);
 }
+#endif /* !SOFTFLOAT */
+
+void fpemul_trapsignal(struct lwp *, unsigned int, unsigned int);
+
+void
+fpemul_trapsignal(struct lwp *l, unsigned int sig, unsigned int code)
+{
+       ksiginfo_t ksi;
+
+       printf("emul_trapsignal(%x,%x)\n", sig, code);
+
+       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