From 62fe81e9c1ab09f1b401231f58d9c34008c7b558 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Fri, 7 Mar 2014 15:56:23 -0500 Subject: cpu: Make CPU and ThreadContext getters const This patch merely tidies up the CPU and ThreadContext getters by making them const where appropriate. --- src/cpu/base_dyn_inst.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/cpu/base_dyn_inst.hh') 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 -- cgit v1.2.3