mem-cache: Add multiple eviction stats
[gem5.git] / src / arch / x86 / utility.hh
index dcf61bddbb83d2c5c190cc747742120ce13a544b..87d5cbb6c91349b558d96fde4179a8b192aa3653 100644 (file)
 #ifndef __ARCH_X86_UTILITY_HH__
 #define __ARCH_X86_UTILITY_HH__
 
-#include "arch/x86/regs/misc.hh"
-#include "arch/x86/types.hh"
-#include "base/hashmap.hh"
-#include "base/misc.hh"
-#include "base/types.hh"
 #include "cpu/static_inst.hh"
 #include "cpu/thread_context.hh"
 #include "sim/full_system.hh"
 
-class ThreadContext;
-
 namespace X86ISA
 {
 
@@ -94,7 +87,7 @@ namespace X86ISA
     void skipFunction(ThreadContext *tc);
 
     inline void
-    advancePC(PCState &pc, const StaticInstPtr inst)
+    advancePC(PCState &pc, const StaticInstPtr &inst)
     {
         inst->advancePC(pc);
     }
@@ -187,6 +180,22 @@ namespace X86ISA
      * @return New value of the FTW register.
      */
     uint16_t genX87Tags(uint16_t ftw, uint8_t top, int8_t spm);
+
+    /**
+     * Load an 80-bit float from memory and convert it to double.
+     *
+     * @param mem Pointer to an 80-bit float.
+     * @return double representation of the 80-bit float.
+     */
+    double loadFloat80(const void *mem);
+
+    /**
+     * Convert and store a double as an 80-bit float.
+     *
+     * @param mem Pointer to destination for the 80-bit float.
+     * @param value Double precision float to store.
+     */
+    void storeFloat80(void *mem, double value);
 }
 
 #endif // __ARCH_X86_UTILITY_HH__