Source-Changes-HG archive

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

[src/netbsd-8]: src/lib/libm/arch/alpha Pull up following revision(s) (reques...



details:   https://anonhg.NetBSD.org/src/rev/6ad097d77506
branches:  netbsd-8
changeset: 434678:6ad097d77506
user:      snj <snj%NetBSD.org@localhost>
date:      Mon Feb 26 01:22:04 2018 +0000

description:
Pull up following revision(s) (requested by maya in ticket #583):
        lib/libm/arch/alpha/fenv.c: 1.3
Fix usage of sysarch(ALPHA_FPGETMASK)

diffstat:

 lib/libm/arch/alpha/fenv.c |  16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diffs (64 lines):

diff -r d052b3f02c48 -r 6ad097d77506 lib/libm/arch/alpha/fenv.c
--- a/lib/libm/arch/alpha/fenv.c        Mon Feb 26 01:20:21 2018 +0000
+++ b/lib/libm/arch/alpha/fenv.c        Mon Feb 26 01:22:04 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fenv.c,v 1.2 2017/03/22 23:11:08 chs Exp $     */
+/*     $NetBSD: fenv.c,v 1.2.4.1 2018/02/26 01:22:04 snj Exp $ */
 
 /*-
  * Copyright (c) 2004-2005 David Schultz <das%FreeBSD.ORG@localhost>
@@ -28,7 +28,7 @@
  * $FreeBSD: src/lib/msun/alpha/fenv.c,v 1.2 2005/03/16 19:03:44 das Exp $
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: fenv.c,v 1.2 2017/03/22 23:11:08 chs Exp $");
+__RCSID("$NetBSD: fenv.c,v 1.2.4.1 2018/02/26 01:22:04 snj Exp $");
 
 #include "namespace.h"
 
@@ -63,7 +63,7 @@
         * only need to issue an excb after the mf_fpcr to ensure that
         * the read is executed before any subsequent FP ops.
         */
-       sysarch(ALPHA_FPGETMASK, (char *)&p);
+       p.mask = sysarch(ALPHA_FPGETMASK, 0);
        __mf_fpcr(&r.__d);
        *envp = r.__bits | p.mask;
        __excb();
@@ -76,7 +76,7 @@
        struct alpha_fp_except_args p;
        union __fpcr r;
 
-       sysarch(ALPHA_FPGETMASK, (char *)&p);
+       p.mask = sysarch(ALPHA_FPGETMASK, 0);
        __mf_fpcr(&r.__d);
        *envp = r.__bits | p.mask;
        r.__bits &= ~((fenv_t)FE_ALL_EXCEPT << _FPUSW_SHIFT);
@@ -124,7 +124,7 @@
 {
        struct alpha_fp_except_args p;
 
-       sysarch(ALPHA_FPGETMASK, &p);
+       p.mask = sysarch(ALPHA_FPGETMASK, 0);
        p.mask |= (mask & FE_ALL_EXCEPT);
        sysarch(ALPHA_FPSETMASK, &p);
        return p.mask;
@@ -135,7 +135,7 @@
 {
        struct alpha_fp_except_args p;
 
-       sysarch(ALPHA_FPGETMASK, &p);
+       p.mask = sysarch(ALPHA_FPGETMASK, 0);
        p.mask &= ~(mask & FE_ALL_EXCEPT);
        sysarch(ALPHA_FPSETMASK, &p);
        return p.mask;
@@ -144,8 +144,6 @@
 int
 fegetexcept(void)
 {
-       struct alpha_fp_except_args p;
 
-       sysarch(ALPHA_FPGETMASK, &p);
-       return p.mask;
+       return sysarch(ALPHA_FPGETMASK, 0);
 }



Home | Main Index | Thread Index | Old Index