Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/include Fixed feholdexcept() by copying the...



details:   https://anonhg.NetBSD.org/src/rev/a1953e269057
branches:  trunk
changeset: 826638:a1953e269057
user:      phx <phx%NetBSD.org@localhost>
date:      Mon Sep 18 23:21:15 2017 +0000

description:
Fixed feholdexcept() by copying the actual contents of FPSCR to the fenv_t
instead of a double precision floating point representation of it.

diffstat:

 sys/arch/powerpc/include/fenv.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 9d5771fe5a3d -r a1953e269057 sys/arch/powerpc/include/fenv.h
--- a/sys/arch/powerpc/include/fenv.h   Mon Sep 18 16:58:04 2017 +0000
+++ b/sys/arch/powerpc/include/fenv.h   Mon Sep 18 23:21:15 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fenv.h,v 1.3 2017/03/22 23:11:09 chs Exp $     */
+/*     $NetBSD: fenv.h,v 1.4 2017/09/18 23:21:15 phx Exp $     */
 
 /*-
  * Copyright (c) 2004-2005 David Schultz <das%FreeBSD.ORG@localhost>
@@ -242,7 +242,7 @@
        uint32_t msr;
 
        __mffs(&__r.__d);
-       *__envp = __r.__d;
+       *__envp = __r.__bits.__reg;
        __r.__bits.__reg &= ~(FE_ALL_EXCEPT | _ENABLE_MASK);
        __mtfsf(__r.__d);
        __updatemsr(__r.__bits.__reg);



Home | Main Index | Thread Index | Old Index