Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/fpu Do not raise divide-by-zero exception w...



details:   https://anonhg.NetBSD.org/src/rev/6e93cea9289a
branches:  trunk
changeset: 935979:6e93cea9289a
user:      rin <rin%NetBSD.org@localhost>
date:      Wed Jul 15 07:47:27 2020 +0000

description:
Do not raise divide-by-zero exception when dividend is zero.

diffstat:

 sys/arch/powerpc/fpu/fpu_div.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r 03b5fe4b9f93 -r 6e93cea9289a sys/arch/powerpc/fpu/fpu_div.c
--- a/sys/arch/powerpc/fpu/fpu_div.c    Wed Jul 15 07:44:34 2020 +0000
+++ b/sys/arch/powerpc/fpu/fpu_div.c    Wed Jul 15 07:47:27 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpu_div.c,v 1.5 2020/06/27 03:07:57 rin Exp $ */
+/*     $NetBSD: fpu_div.c,v 1.6 2020/07/15 07:47:27 rin Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_div.c,v 1.5 2020/06/27 03:07:57 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_div.c,v 1.6 2020/07/15 07:47:27 rin Exp $");
 
 #include <sys/types.h>
 #if defined(DIAGNOSTIC)||defined(DEBUG)
@@ -200,7 +200,6 @@
                return (x);
        }
        if (ISZERO(x)) {
-               fe->fe_cx |= FPSCR_ZX;
                if (x->fp_class == y->fp_class) {
                        fe->fe_cx |= FPSCR_VXZDZ;
                        return (fpu_newnan(fe));



Home | Main Index | Thread Index | Old Index