mem: Add missing flag test functions to Request
authorYu-hsin Wang <yuhsingw@google.com>
Fri, 11 Dec 2020 03:12:08 +0000 (11:12 +0800)
committerYu-hsin Wang <yuhsingw@google.com>
Mon, 14 Dec 2020 01:49:06 +0000 (01:49 +0000)
Change-Id: I800c45c855332a2dd1ec5f31b135db62181e5204
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38455
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/mem/request.hh

index b9d7e1406ca28c134b0c0ae02cf0a93f7c89519f..fbcf89b70683d0bd336c6176c43c018a7ce6cdd6 100644 (file)
@@ -576,6 +576,12 @@ class Request
     /**
      * Accessor for instruction count.
      */
+    bool
+    hasInstCount() const
+    {
+      return privateFlags.isSet(VALID_INST_COUNT);
+    }
+
     Counter getInstCount() const
     {
         assert(privateFlags.isSet(VALID_INST_COUNT));
@@ -686,6 +692,12 @@ class Request
     /**
      * Accessor for hardware transactional memory abort cause.
      */
+    bool
+    hasHtmAbortCause() const
+    {
+      return privateFlags.isSet(VALID_HTM_ABORT_CAUSE);
+    }
+
     HtmFailureFaultCause
     getHtmAbortCause() const
     {
@@ -805,6 +817,12 @@ class Request
         return _contextId;
     }
 
+    bool
+    hasStreamId() const
+    {
+      return privateFlags.isSet(VALID_STREAM_ID);
+    }
+
     uint32_t
     streamId() const
     {