summaryrefslogtreecommitdiff
path: root/src/cpu/base_dyn_inst.hh
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2014-03-07 15:56:23 -0500
committerAndreas Hansson <andreas.hansson@arm.com>2014-03-07 15:56:23 -0500
commit62fe81e9c1ab09f1b401231f58d9c34008c7b558 (patch)
tree732e6ac33b6be91999dfeb3b95f1d98746146b9d /src/cpu/base_dyn_inst.hh
parentc4a8e5c36cbc30feee6ecd5c706e3275301b25ef (diff)
downloadgem5-62fe81e9c1ab09f1b401231f58d9c34008c7b558.tar.xz
cpu: Make CPU and ThreadContext getters const
This patch merely tidies up the CPU and ThreadContext getters by making them const where appropriate.
Diffstat (limited to 'src/cpu/base_dyn_inst.hh')
-rw-r--r--src/cpu/base_dyn_inst.hh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cpu/base_dyn_inst.hh b/src/cpu/base_dyn_inst.hh
index 3ce7de75d..cafe51fd7 100644
--- a/src/cpu/base_dyn_inst.hh
+++ b/src/cpu/base_dyn_inst.hh
@@ -454,16 +454,16 @@ class BaseDynInst : public RefCounted
void dump(std::string &outstring);
/** Read this CPU's ID. */
- int cpuId() { return cpu->cpuId(); }
+ int cpuId() const { return cpu->cpuId(); }
/** Read this CPU's data requestor ID */
- MasterID masterId() { return cpu->dataMasterId(); }
+ MasterID masterId() const { return cpu->dataMasterId(); }
/** Read this context's system-wide ID **/
- int contextId() { return thread->contextId(); }
+ int contextId() const { return thread->contextId(); }
/** Returns the fault type. */
- Fault getFault() { return fault; }
+ Fault getFault() const { return fault; }
/** Checks whether or not this instruction has had its branch target
* calculated yet. For now it is not utilized and is hacked to be