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/07dbbd5e9640
branches:  trunk
changeset: 973852:07dbbd5e9640
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 ef41e938748d -r 07dbbd5e9640 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