summaryrefslogtreecommitdiff
path: root/src/arch/x86/utility.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/utility.hh')
-rw-r--r--src/arch/x86/utility.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/arch/x86/utility.hh b/src/arch/x86/utility.hh
index 6fc802f2f..48840ac77 100644
--- a/src/arch/x86/utility.hh
+++ b/src/arch/x86/utility.hh
@@ -134,6 +134,13 @@ namespace X86ISA
* @param val New rflags value to store in TC
*/
void setRFlags(ThreadContext *tc, uint64_t val);
+
+ /**
+ * Extract the bit string representing a double value.
+ */
+ inline uint64_t getDoubleBits(double val) {
+ return *(uint64_t *)(&val);
+ }
}
#endif // __ARCH_X86_UTILITY_HH__