diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2014-09-27 09:08:36 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2014-09-27 09:08:36 -0400 |
commit | 341dbf266258dcbdb1e5e9f09c244b8ac271faaf (patch) | |
tree | f071f9a91adeb0c1eb0888ae751c3ee0196bd65d /src/arch/mips/faults.cc | |
parent | deb2200671d5b4856ca27d4286253db0d9e12a32 (diff) | |
download | gem5-341dbf266258dcbdb1e5e9f09c244b8ac271faaf.tar.xz |
arch: Use const StaticInstPtr references where possible
This patch optimises the passing of StaticInstPtr by avoiding copying
the reference-counting pointer. This avoids first incrementing and
then decrementing the reference-counting pointer.
Diffstat (limited to 'src/arch/mips/faults.cc')
-rw-r--r-- | src/arch/mips/faults.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/arch/mips/faults.cc b/src/arch/mips/faults.cc index 3697601dc..eae6bc927 100644 --- a/src/arch/mips/faults.cc +++ b/src/arch/mips/faults.cc @@ -131,7 +131,7 @@ MipsFaultBase::setExceptionState(ThreadContext *tc, uint8_t excCode) } void -MipsFaultBase::invoke(ThreadContext *tc, StaticInstPtr inst) +MipsFaultBase::invoke(ThreadContext *tc, const StaticInstPtr &inst) { if (FullSystem) { DPRINTF(MipsPRA, "Fault %s encountered.\n", name()); @@ -143,7 +143,7 @@ MipsFaultBase::invoke(ThreadContext *tc, StaticInstPtr inst) } void -ResetFault::invoke(ThreadContext *tc, StaticInstPtr inst) +ResetFault::invoke(ThreadContext *tc, const StaticInstPtr &inst) { if (FullSystem) { DPRINTF(MipsPRA, "%s encountered.\n", name()); @@ -160,13 +160,13 @@ ResetFault::invoke(ThreadContext *tc, StaticInstPtr inst) } void -SoftResetFault::invoke(ThreadContext *tc, StaticInstPtr inst) +SoftResetFault::invoke(ThreadContext *tc, const StaticInstPtr &inst) { panic("Soft reset not implemented.\n"); } void -NonMaskableInterrupt::invoke(ThreadContext *tc, StaticInstPtr inst) +NonMaskableInterrupt::invoke(ThreadContext *tc, const StaticInstPtr &inst) { panic("Non maskable interrupt not implemented.\n"); } |