Module Name:    src
Committed By:   matt
Date:           Tue Apr 30 01:45:14 UTC 2013

Modified Files:
        src/lib/libm/arch/arm: fenv.c

Log Message:
Make this compile for earmhf


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libm/arch/arm/fenv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libm/arch/arm/fenv.c
diff -u src/lib/libm/arch/arm/fenv.c:1.1 src/lib/libm/arch/arm/fenv.c:1.2
--- src/lib/libm/arch/arm/fenv.c:1.1	Sun Apr 28 21:06:34 2013
+++ src/lib/libm/arch/arm/fenv.c	Tue Apr 30 01:45:13 2013
@@ -28,20 +28,20 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: fenv.c,v 1.1 2013/04/28 21:06:34 matt Exp $");
+__RCSID("$NetBSD: fenv.c,v 1.2 2013/04/30 01:45:13 matt Exp $");
 
 #include <sys/types.h>
 #include <assert.h>
 #include <fenv.h>
 #include <string.h>
 #include <unistd.h>
+#include <inttypes.h>
 
 #ifdef __SOFTFP__
 #include <ieeefp.h>
 #include <sys/signal.h>
 #include <sys/siginfo.h>
 #else
-#include <inttypes.h>
 #include <arm/armreg.h>
 #endif
 
@@ -56,7 +56,9 @@ const fenv_t __fe_dfl_env = VFP_FPSCR_FZ
 int
 feclearexcept(int excepts)
 {
+#ifndef lint
 	_DIAGASSERT((except & ~FE_EXCEPT_ALL) == 0);
+#endif
 #ifdef __SOFTFP__
 	int old = fpresetsticky(excepts);
 	return old & ~excepts;
@@ -93,7 +95,9 @@ fegetexceptflag(fexcept_t *flagp, int ex
 int
 feraiseexcept(int excepts)
 {
+#ifndef lint
 	_DIAGASSERT((except & ~FE_EXCEPT_ALL) == 0);
+#endif
 #ifdef __SOFTFP__
 	excepts &= fpgetsticky();
 
@@ -116,7 +120,7 @@ feraiseexcept(int excepts)
 		sigqueueinfo(getpid(), &info);
 	}
 #else
-	uint32_t fpscr = armreg_fpscr_read();
+	int fpscr = armreg_fpscr_read();
 	fpscr = (fpscr & ~VFP_FPSCR_ESUM) | __SHIFTIN(excepts, VFP_FPSCR_ESUM);
 	armreg_fpscr_write(fpscr);
 #endif
@@ -135,7 +139,9 @@ feraiseexcept(int excepts)
 int
 fesetexceptflag(const fexcept_t *flagp, int excepts)
 {
+#ifndef lint
 	_DIAGASSERT((except & ~FE_EXCEPT_ALL) == 0);
+#endif
 #ifdef __SOFTFP__
 	fpsetsticky((fpgetsticky() & ~excepts) | (excepts & *flagp));
 #else
@@ -184,7 +190,9 @@ fegetround(void)
 int
 fesetround(int round)
 {
+#ifndef lint
 	_DIAGASSERT(!(round & ~__SHIFTOUT(VFP_FPSCR_RMODE, VFP_FPSCR_RMODE)));
+#endif
 #ifdef __SOFTFP__
 	(void)fpsetround(round);
 #else
@@ -262,8 +270,9 @@ fesetenv(const fenv_t *envp)
 int
 feupdateenv(const fenv_t *envp)
 {
+#ifndef lint
 	_DIAGASSERT(envp != NULL);
-
+#endif
 #ifdef __SOFTFP__
 	(void)fpsetround(__SHIFTIN(*envp, VFP_FPSCR_RMODE));
 	(void)fpsetmask(fpgetmask() | __SHIFTOUT(*envp, VFP_FPSCR_ESUM));

Reply via email to