summaryrefslogtreecommitdiff
path: root/src/base/fenv.hh
diff options
context:
space:
mode:
authorRon Dreslinski <rdreslin@umich.edu>2007-04-23 14:38:04 -0400
committerRon Dreslinski <rdreslin@umich.edu>2007-04-23 14:38:04 -0400
commit3eb4ba3abb0457fce0415b9fd5afb623028b1482 (patch)
tree356ec82872760b74a3dad82aad18ef27719d9b4d /src/base/fenv.hh
parent3b95161da834baa0d1bd635934ed308c2ec03632 (diff)
parent46f6fa8b45a1a1a572085f33c5173b189f76e407 (diff)
downloadgem5-3eb4ba3abb0457fce0415b9fd5afb623028b1482.tar.xz
Merge zizzer:/bk/newmem
into zazzer.eecs.umich.edu:/z/rdreslin/m5bk/head --HG-- extra : convert_revision : 11df5fb2a8f1fa020d042e75b22a7f2f2bcbd9ab
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