summaryrefslogtreecommitdiff
path: root/src/base/bigint.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/bigint.hh')
-rw-r--r--src/base/bigint.hh14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/base/bigint.hh b/src/base/bigint.hh
index ed48c67fe..d60684231 100644
--- a/src/base/bigint.hh
+++ b/src/base/bigint.hh
@@ -28,6 +28,8 @@
* Authors: Ali Saidi
*/
+#include "base/misc.hh"
+
#include <iostream>
#ifndef __BASE_BIGINT_HH__
@@ -49,6 +51,12 @@ struct m5_twin64_t {
b = x;
return *this;
}
+
+ operator uint64_t()
+ {
+ panic("Tried to cram a twin64_t into an integer!\n");
+ return a;
+ }
};
struct m5_twin32_t {
@@ -67,6 +75,12 @@ struct m5_twin32_t {
b = x;
return *this;
}
+
+ operator uint32_t()
+ {
+ panic("Tried to cram a twin32_t into an integer!\n");
+ return a;
+ }
};