Module Name: src
Committed By: chs
Date: Mon Feb 27 06:56:03 UTC 2017
Modified Files:
src/sys/arch/mips/include: ieeefp.h
Log Message:
the FP_* rounding constants need to be different from the new FE_* constants
to preserve the ABI, so shift them as needed when using them.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/include/ieeefp.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/mips/include/ieeefp.h
diff -u src/sys/arch/mips/include/ieeefp.h:1.8 src/sys/arch/mips/include/ieeefp.h:1.9
--- src/sys/arch/mips/include/ieeefp.h:1.8 Fri Dec 25 06:01:38 2015
+++ src/sys/arch/mips/include/ieeefp.h Mon Feb 27 06:56:03 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: ieeefp.h,v 1.8 2015/12/25 06:01:38 christos Exp $ */
+/* $NetBSD: ieeefp.h,v 1.9 2017/02/27 06:56:03 chs Exp $ */
/*
* Written by J.T. Conklin, Apr 11, 1995
@@ -17,11 +17,15 @@
#if !defined(_ISOC99_SOURCE)
typedef unsigned int fp_except;
-#define FP_X_IMP FE_INEXACT /* imprecise (loss of precision) */
-#define FP_X_UFL FE_UNDERFLOW /* underflow exception */
-#define FP_X_OFL FE_OVERFLOW /* overflow exception */
-#define FP_X_DZ FE_DIVBYZERO /* divide-by-zero exception */
-#define FP_X_INV FE_INVALID /* invalid operation exception */
+
+/* adjust for FP_* and FE_* value differences */
+#define __FPE(x) ((x) >> 2)
+
+#define FP_X_IMP __FPE(FE_INEXACT) /* imprecise (loss of precision) */
+#define FP_X_UFL __FPE(FE_UNDERFLOW) /* underflow exception */
+#define FP_X_OFL __FPE(FE_OVERFLOW) /* overflow exception */
+#define FP_X_DZ __FPE(FE_DIVBYZERO) /* divide-by-zero exception */
+#define FP_X_INV __FPE(FE_INVALID) /* invalid operation exception */
typedef enum {
FP_RN=FE_TONEAREST, /* round to nearest representable number */