Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/amd64/amd64 follow suit with the i386, and correct ...



details:   https://anonhg.NetBSD.org/src/rev/39f6828b8399
branches:  trunk
changeset: 756610:39f6828b8399
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Jul 26 12:39:04 2010 +0000

description:
follow suit with the i386, and correct the siginfo codes for integer overflow
and zerodivide.

diffstat:

 sys/arch/amd64/amd64/trap.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r 09b5457bd0d4 -r 39f6828b8399 sys/arch/amd64/amd64/trap.c
--- a/sys/arch/amd64/amd64/trap.c       Mon Jul 26 12:30:16 2010 +0000
+++ b/sys/arch/amd64/amd64/trap.c       Mon Jul 26 12:39:04 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.63 2010/07/07 01:15:34 chs Exp $    */
+/*     $NetBSD: trap.c,v 1.64 2010/07/26 12:39:04 christos Exp $       */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.63 2010/07/07 01:15:34 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.64 2010/07/26 12:39:04 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -464,13 +464,15 @@
                ksi.ksi_signo = SIGFPE;
                ksi.ksi_trap = type & ~T_USER;
                ksi.ksi_addr = (void *)frame->tf_rip;
-               switch (type ) {
+               switch (type) {
                case T_BOUND|T_USER:
+                       ksi.ksi_code = FPE_FLTSUB;
+                       break;
                case T_OFLOW|T_USER:
-                       ksi.ksi_code = FPE_FLTOVF;
+                       ksi.ksi_code = FPE_INTOVF;
                        break;
                case T_DIVIDE|T_USER:
-                       ksi.ksi_code = FPE_FLTDIV;
+                       ksi.ksi_code = FPE_INTDIV;
                        break;
                default:
 #ifdef DIAGNOSTIC



Home | Main Index | Thread Index | Old Index