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 Fix logic for FPSCR[OX]; set FPSCR[FI] ...



details:   https://anonhg.NetBSD.org/src/rev/b5d8ea333915
branches:  trunk
changeset: 370062:b5d8ea333915
user:      rin <rin%NetBSD.org@localhost>
date:      Wed Sep 14 05:55:08 2022 +0000

description:
Fix logic for FPSCR[OX]; set FPSCR[FI] (and therefore FPSCR[XX]).

diffstat:

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

diffs (36 lines):

diff -r 90787c8768ed -r b5d8ea333915 sys/arch/powerpc/fpu/fpu_implode.c
--- a/sys/arch/powerpc/fpu/fpu_implode.c        Wed Sep 14 05:54:07 2022 +0000
+++ b/sys/arch/powerpc/fpu/fpu_implode.c        Wed Sep 14 05:55:08 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpu_implode.c,v 1.23 2022/09/14 05:54:07 rin Exp $ */
+/*     $NetBSD: fpu_implode.c,v 1.24 2022/09/14 05:55:08 rin Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_implode.c,v 1.23 2022/09/14 05:54:07 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_implode.c,v 1.24 2022/09/14 05:55:08 rin Exp $");
 
 #include <sys/types.h>
 #include <sys/systm.h>
@@ -416,7 +416,7 @@
        if (round(fe, fp, cx) && fp->fp_mant[3] == SNG_EXP(2))
                exp++;
        if (exp >= SNG_EXP_INFNAN) {
-               *cx |= FPSCR_OX;
+               *cx |= FPSCR_OX | FPSCR_FI;
                /* overflow to inf or to max single */
                if (toinf(fe, sign)) {
                        *cx |= FPRF_SIGN(sign) | FPSCR_FU;
@@ -486,7 +486,7 @@
        if (round(fe, fp, cx) && fp->fp_mant[2] == DBL_EXP(2))
                exp++;
        if (exp >= DBL_EXP_INFNAN) {
-               *cx |= FPSCR_OX;
+               *cx |= FPSCR_OX | FPSCR_FI;
                /* overflow to inf or to max double */
                if (toinf(fe, sign)) {
                        *cx |= FPRF_SIGN(sign) | FPSCR_FU;



Home | Main Index | Thread Index | Old Index