summaryrefslogtreecommitdiff
path: root/src/base/fenv.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-04-23 11:34:39 -0400
committerGabe Black <gblack@eecs.umich.edu>2007-04-23 11:34:39 -0400
commita006aa067a197f5ce2cd3f22ffe30ae3d9103cbf (patch)
tree1a10eafaa85a1f97b17b040813fd6348aa1db9d2 /src/base/fenv.hh
parentf3a0abbecc3456147f1ca3e297a50ae4353316fd (diff)
parentdbc1edd23deed386c952a77488a70f20485da711 (diff)
downloadgem5-a006aa067a197f5ce2cd3f22ffe30ae3d9103cbf.tar.xz
Merge zizzer.eecs.umich.edu:/z/m5/Bitkeeper/newmem
into zizzer.eecs.umich.edu:/.automount/wexford/x/gblack/m5/newmem-o3-spec --HG-- extra : convert_revision : 12f10c174f0eca1ddf74b672414fbe78251f686b
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