summaryrefslogtreecommitdiff
path: root/src/arch/arm
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2013-02-19 05:56:06 -0500
committerAndreas Hansson <andreas.hansson@arm.com>2013-02-19 05:56:06 -0500
commit0acd2a96e5cd2a9bece4d5468dd1a8cc96c8aafe (patch)
tree0feaa85408e6aba2d4e4b3ad12b7dd4a98e27ed9 /src/arch/arm
parentd670fa60a105676a19dd91440f66dc186450b3e8 (diff)
downloadgem5-0acd2a96e5cd2a9bece4d5468dd1a8cc96c8aafe.tar.xz
scons: Add warning for overloaded virtual functions
A derived function with a different signature than a base class function will result in the base class function of the same name being hidden. The parameter list and return type for the member function in the derived class must match those of the member function in the base class, otherwise the function in the derived class will hide the function in the base class and no polymorphic behaviour will occur. This patch addresses these warnings by ensuring a unique function name to avoid (unintentionally) hiding any functions.
Diffstat (limited to 'src/arch/arm')
-rw-r--r--src/arch/arm/isa/templates/branch.isa3
-rw-r--r--src/arch/arm/linux/process.hh2
-rw-r--r--src/arch/arm/process.hh2
3 files changed, 6 insertions, 1 deletions
diff --git a/src/arch/arm/isa/templates/branch.isa b/src/arch/arm/isa/templates/branch.isa
index 6edfb0ee0..ee06bf573 100644
--- a/src/arch/arm/isa/templates/branch.isa
+++ b/src/arch/arm/isa/templates/branch.isa
@@ -74,6 +74,9 @@ class %(class_name)s : public %(base_class)s
ConditionCode _condCode);
%(BasicExecDeclare)s
ArmISA::PCState branchTarget(const ArmISA::PCState &branchPC) const;
+
+ /// Explicitly import the otherwise hidden branchTarget
+ using StaticInst::branchTarget;
};
}};
diff --git a/src/arch/arm/linux/process.hh b/src/arch/arm/linux/process.hh
index 854b0b176..7d3a943ed 100644
--- a/src/arch/arm/linux/process.hh
+++ b/src/arch/arm/linux/process.hh
@@ -45,6 +45,8 @@ class ArmLinuxProcess : public ArmLiveProcess
void initState();
ArmISA::IntReg getSyscallArg(ThreadContext *tc, int &i);
+ /// Explicitly import the otherwise hidden getSyscallArg
+ using ArmLiveProcess::getSyscallArg;
void setSyscallArg(ThreadContext *tc, int i, ArmISA::IntReg val);
/// The target system's hostname.
diff --git a/src/arch/arm/process.hh b/src/arch/arm/process.hh
index 26a59323f..f8d821037 100644
--- a/src/arch/arm/process.hh
+++ b/src/arch/arm/process.hh
@@ -53,7 +53,7 @@ class ArmLiveProcess : public LiveProcess
public:
void argsInit(int intSize, int pageSize);
- uint64_t getSyscallArg(ThreadContext *tc, int &i, int width);
+ ArmISA::IntReg getSyscallArg(ThreadContext *tc, int &i, int width);
ArmISA::IntReg getSyscallArg(ThreadContext *tc, int &i);
void setSyscallArg(ThreadContext *tc, int i, ArmISA::IntReg val);
void setSyscallReturn(ThreadContext *tc, SyscallReturn return_value);