ruby: cleaning up RubyQueue and RubyNetwork dprintfs
[gem5.git] / src / mem / request.hh
index f2cc4647c085351208ca0699df42d0eb1f349184..ec1b8ba29daa3417501e5c62edc467b3d7f19f5f 100644 (file)
@@ -71,11 +71,9 @@ class Request : public FastAlloc
     static const FlagsType UNCACHEABLE                 = 0x00001000;
     /** This request is to a memory mapped register. */
     static const FlagsType MMAPED_IPR                  = 0x00002000;
+    /** This request is a clear exclusive. */
+    static const FlagsType CLEAR_LL                    = 0x00004000;
 
-    /** The request should ignore unaligned access faults */
-    static const FlagsType NO_ALIGN_FAULT              = 0x00020000;
-    /** The request should ignore unaligned access faults */
-    static const FlagsType NO_HALF_WORD_ALIGN_FAULT    = 0x00040000;
     /** The request should not cause a memory access. */
     static const FlagsType NO_ACCESS                   = 0x00080000;
     /** This request will lock or unlock the accessed memory. When used with
@@ -147,7 +145,7 @@ class Request : public FastAlloc
 
     /**
      * The time this request was started. Used to calculate
-     * latencies. This field is set to curTick any time paddr or vaddr
+     * latencies. This field is set to curTick() any time paddr or vaddr
      * is written.
      */
     Tick _time;
@@ -181,7 +179,7 @@ class Request : public FastAlloc
 
     /**
      * Constructor for physical (e.g. device) requests.  Initializes
-     * just physical address, size, flags, and timestamp (to curTick).
+     * just physical address, size, flags, and timestamp (to curTick()).
      * These fields are adequate to perform a request. 
      */
     Request(Addr paddr, int size, Flags flags)
@@ -194,6 +192,13 @@ class Request : public FastAlloc
         setPhys(paddr, size, flags, time);
     }
 
+    Request(Addr paddr, int size, Flags flags, Tick time, Addr pc)
+    {
+        setPhys(paddr, size, flags, time);
+        privateFlags.set(VALID_PC);
+        _pc = pc;
+    }
+
     Request(int asid, Addr vaddr, int size, Flags flags, Addr pc,
             int cid, ThreadID tid)
     {
@@ -235,7 +240,7 @@ class Request : public FastAlloc
     void
     setPhys(Addr paddr, int size, Flags flags)
     {
-        setPhys(paddr, size, flags, curTick);
+        setPhys(paddr, size, flags, curTick());
     }
 
     /**
@@ -250,7 +255,7 @@ class Request : public FastAlloc
         _vaddr = vaddr;
         _size = size;
         _pc = pc;
-        _time = curTick;
+        _time = curTick();
 
         _flags.clear(~STICKY_FLAGS);
         _flags.set(flags);
@@ -449,24 +454,7 @@ class Request : public FastAlloc
     bool isSwap() const { return _flags.isSet(MEM_SWAP|MEM_SWAP_COND); }
     bool isCondSwap() const { return _flags.isSet(MEM_SWAP_COND); }
     bool isMmapedIpr() const { return _flags.isSet(MMAPED_IPR); }
-
-    bool
-    isMisaligned() const
-    {
-        if (_flags.isSet(NO_ALIGN_FAULT))
-            return false;
-
-        if ((_vaddr & 0x1))
-            return true;
-
-        if (_flags.isSet(NO_HALF_WORD_ALIGN_FAULT))
-            return false;
-
-        if ((_vaddr & 0x2))
-            return true;
-
-        return false;
-    }
+    bool isClearLL() const { return _flags.isSet(CLEAR_LL); }
 };
 
 #endif // __MEM_REQUEST_HH__