Merge zizzer:/z/m5/Bitkeeper/newmem
[gem5.git] / src / mem / packet.hh
index 9e961b0dcf564469f3503c7c982da85bf13d6d95..5d8308df7715844378d6d432bc9c87113c9be5b0 100644 (file)
@@ -217,13 +217,13 @@ class Packet
     bool isRequest()    { return (cmd & IsRequest)  != 0; }
     bool isResponse()   { return (cmd & IsResponse) != 0; }
     bool needsResponse() { return (cmd & NeedsResponse) != 0; }
-    bool isInvalidate()  { return (cmd * IsInvalidate) != 0; }
+    bool isInvalidate()  { return (cmd & IsInvalidate) != 0; }
 
     bool isCacheFill() { return (flags & CACHE_LINE_FILL) != 0; }
     bool isNoAllocate() { return (flags & NO_ALLOCATE) != 0; }
     bool isCompressed() { return (flags & COMPRESSED) != 0; }
 
-    bool nic_pkt() { assert("Unimplemented\n" && 0); }
+    bool nic_pkt() { assert("Unimplemented\n" && 0); return false; }
 
     /** Possible results of a packet's request. */
     enum Result
@@ -266,6 +266,7 @@ class Packet
            result(Unknown)
     {
         flags = 0;
+        time = curTick;
     }
 
     /** Alternate constructor if you are trying to create a packet with
@@ -280,6 +281,7 @@ class Packet
            result(Unknown)
     {
         flags = 0;
+        time = curTick;
     }
 
     /** Destructor. */
@@ -295,6 +297,7 @@ class Packet
         assert(req->validPaddr);
         addr = req->paddr;
         size = req->size;
+        time = req->time;
         addrSizeValid = true;
         result = Unknown;
         if (dynamicData) {