summaryrefslogtreecommitdiff
path: root/src/base/fenv.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/fenv.hh')
-rw-r--r--src/base/fenv.hh21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/base/fenv.hh b/src/base/fenv.hh
index 013d2f09b..42b383888 100644
--- a/src/base/fenv.hh
+++ b/src/base/fenv.hh
@@ -33,20 +33,21 @@
#include "config/use_fenv.hh"
-#if USE_FENV
-
-#include <fenv.h>
+#define M5_FE_DOWNWARD 0
+#define M5_FE_TONEAREST 1
+#define M5_FE_TOWARDZERO 2
+#define M5_FE_UPWARD 3
+#if USE_FENV
+extern "C" {
+void m5_fesetround(int rm);
+int m5_fegetround();
+}
#else
// Dummy definitions to allow code to compile w/o a real <fenv.h>.
-
-#define FE_TONEAREST 0
-#define FE_DOWNWARD 0
-#define FE_UPWARD 0
-#define FE_TOWARDZERO 0
-
-inline int fesetround(int rounding_mode) { return 0; }
+inline void m5_fesetround(int rm) { ; }
+inline int m5_fegetround() {return 0; }
#endif // USE_FENV