Skip to content

Commit

Permalink
Fixed feholdexcept() by copying the actual contents of FPSCR to the f…
Browse files Browse the repository at this point in the history
…env_t

instead of a double precision floating point representation of it.
  • Loading branch information
phx authored and phx committed Sep 18, 2017
1 parent b9f0ec0 commit fc99667
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sys/arch/powerpc/include/fenv.h
@@ -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>
Expand Down Expand Up @@ -242,7 +242,7 @@ feholdexcept(fenv_t *__envp)
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);
Expand Down

0 comments on commit fc99667

Please sign in to comment.