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 FPU generates QNaN with all payload bit...



details:   https://anonhg.NetBSD.org/src/rev/7186c0a74269
branches:  trunk
changeset: 369892:7186c0a74269
user:      rin <rin%NetBSD.org@localhost>
date:      Tue Sep 06 23:02:36 2022 +0000

description:
FPU generates QNaN with all payload bits being cleared.

diffstat:

 sys/arch/powerpc/fpu/fpu_subr.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r f5284c55a9c0 -r 7186c0a74269 sys/arch/powerpc/fpu/fpu_subr.c
--- a/sys/arch/powerpc/fpu/fpu_subr.c   Tue Sep 06 23:00:43 2022 +0000
+++ b/sys/arch/powerpc/fpu/fpu_subr.c   Tue Sep 06 23:02:36 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpu_subr.c,v 1.8 2022/09/04 22:34:58 rin Exp $ */
+/*     $NetBSD: fpu_subr.c,v 1.9 2022/09/06 23:02:36 rin Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_subr.c,v 1.8 2022/09/04 22:34:58 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_subr.c,v 1.9 2022/09/06 23:02:36 rin Exp $");
 
 #include <sys/types.h>
 #include <sys/systm.h>
@@ -209,8 +209,8 @@
        fp = &fe->fe_f3;
        fp->fp_class = FPC_QNAN;
        fp->fp_sign = 0;
-       fp->fp_mant[0] = FP_1 - 1;
-       fp->fp_mant[1] = fp->fp_mant[2] = fp->fp_mant[3] = ~0;
+       fp->fp_mant[0] = FP_QUIETBIT;
+       fp->fp_mant[1] = fp->fp_mant[2] = fp->fp_mant[3] = 0;
        DUMPFPN(FPE_REG, fp);
        return (fp);
 }



Home | Main Index | Thread Index | Old Index