Make it so that all thread contexts are registered with the System, even in
[gem5.git] / src / cpu / static_inst.hh
index 8a1b3e7496cba6de0ea69934233e7bf0589163fb..032a304ad8aee9f6748a95da0a800593d0d87990 100644 (file)
@@ -72,7 +72,27 @@ namespace Trace {
     class InstRecord;
 }
 
-typedef uint32_t MicroPC;
+typedef uint16_t MicroPC;
+
+static const MicroPC MicroPCRomBit = 1 << (sizeof(MicroPC) * 8 - 1);
+
+static inline MicroPC
+romMicroPC(MicroPC upc)
+{
+    return upc | MicroPCRomBit;
+}
+
+static inline MicroPC
+normalMicroPC(MicroPC upc)
+{
+    return upc & ~MicroPCRomBit;
+}
+
+static inline bool
+isRomMicroPC(MicroPC upc)
+{
+    return MicroPCRomBit & upc;
+}
 
 /**
  * Base, ISA-independent static instruction class.