summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/faults.cc14
-rw-r--r--src/arch/x86/faults.hh32
-rw-r--r--src/arch/x86/stacktrace.cc2
-rw-r--r--src/arch/x86/stacktrace.hh6
-rw-r--r--src/arch/x86/utility.hh2
5 files changed, 28 insertions, 28 deletions
diff --git a/src/arch/x86/faults.cc b/src/arch/x86/faults.cc
index 0cbf2334e..e3a4befb2 100644
--- a/src/arch/x86/faults.cc
+++ b/src/arch/x86/faults.cc
@@ -50,7 +50,7 @@
namespace X86ISA
{
- void X86FaultBase::invoke(ThreadContext * tc, StaticInstPtr inst)
+ void X86FaultBase::invoke(ThreadContext * tc, const StaticInstPtr &inst)
{
if (!FullSystem) {
FaultBase::invoke(tc, inst);
@@ -104,7 +104,7 @@ namespace X86ISA
return ss.str();
}
- void X86Trap::invoke(ThreadContext * tc, StaticInstPtr inst)
+ void X86Trap::invoke(ThreadContext * tc, const StaticInstPtr &inst)
{
X86FaultBase::invoke(tc);
if (!FullSystem)
@@ -116,13 +116,13 @@ namespace X86ISA
pc.uEnd();
}
- void X86Abort::invoke(ThreadContext * tc, StaticInstPtr inst)
+ void X86Abort::invoke(ThreadContext * tc, const StaticInstPtr &inst)
{
panic("Abort exception!");
}
void
- InvalidOpcode::invoke(ThreadContext * tc, StaticInstPtr inst)
+ InvalidOpcode::invoke(ThreadContext * tc, const StaticInstPtr &inst)
{
if (FullSystem) {
X86Fault::invoke(tc, inst);
@@ -132,7 +132,7 @@ namespace X86ISA
}
}
- void PageFault::invoke(ThreadContext * tc, StaticInstPtr inst)
+ void PageFault::invoke(ThreadContext * tc, const StaticInstPtr &inst)
{
if (FullSystem) {
HandyM5Reg m5reg = tc->readMiscRegNoEffect(MISCREG_M5_REG);
@@ -170,7 +170,7 @@ namespace X86ISA
}
void
- InitInterrupt::invoke(ThreadContext *tc, StaticInstPtr inst)
+ InitInterrupt::invoke(ThreadContext *tc, const StaticInstPtr &inst)
{
DPRINTF(Faults, "Init interrupt.\n");
// The otherwise unmodified integer registers should be set to 0.
@@ -288,7 +288,7 @@ namespace X86ISA
}
void
- StartupInterrupt::invoke(ThreadContext *tc, StaticInstPtr inst)
+ StartupInterrupt::invoke(ThreadContext *tc, const StaticInstPtr &inst)
{
DPRINTF(Faults, "Startup interrupt with vector %#x.\n", vector);
HandyM5Reg m5Reg = tc->readMiscReg(MISCREG_M5_REG);
diff --git a/src/arch/x86/faults.hh b/src/arch/x86/faults.hh
index 86b633471..b43cda36a 100644
--- a/src/arch/x86/faults.hh
+++ b/src/arch/x86/faults.hh
@@ -85,8 +85,8 @@ namespace X86ISA
return false;
}
- void invoke(ThreadContext * tc,
- StaticInstPtr inst = StaticInst::nullStaticInstPtr);
+ void invoke(ThreadContext * tc, const StaticInstPtr &inst =
+ StaticInst::nullStaticInstPtr);
virtual std::string describe() const;
@@ -120,8 +120,8 @@ namespace X86ISA
: X86FaultBase(name, mnem, vector, _errorCode)
{}
- void invoke(ThreadContext * tc,
- StaticInstPtr inst = StaticInst::nullStaticInstPtr);
+ void invoke(ThreadContext * tc, const StaticInstPtr &inst =
+ StaticInst::nullStaticInstPtr);
};
// Base class for x86 aborts which seem to be catastrophic failures.
@@ -133,8 +133,8 @@ namespace X86ISA
: X86FaultBase(name, mnem, vector, _errorCode)
{}
- void invoke(ThreadContext * tc,
- StaticInstPtr inst = StaticInst::nullStaticInstPtr);
+ void invoke(ThreadContext * tc, const StaticInstPtr &inst =
+ StaticInst::nullStaticInstPtr);
};
// Base class for x86 interrupts.
@@ -155,8 +155,8 @@ namespace X86ISA
return "unimplemented_micro";
}
- void invoke(ThreadContext * tc,
- StaticInstPtr inst = StaticInst::nullStaticInstPtr)
+ void invoke(ThreadContext * tc, const StaticInstPtr &inst =
+ StaticInst::nullStaticInstPtr)
{
panic("Unimplemented instruction!");
}
@@ -248,8 +248,8 @@ namespace X86ISA
X86Fault("Invalid-Opcode", "#UD", 6)
{}
- void invoke(ThreadContext * tc,
- StaticInstPtr inst = StaticInst::nullStaticInstPtr);
+ void invoke(ThreadContext * tc, const StaticInstPtr &inst =
+ StaticInst::nullStaticInstPtr);
};
class DeviceNotAvailable : public X86Fault
@@ -331,8 +331,8 @@ namespace X86ISA
errorCode = code;
}
- void invoke(ThreadContext * tc,
- StaticInstPtr inst = StaticInst::nullStaticInstPtr);
+ void invoke(ThreadContext * tc, const StaticInstPtr &inst =
+ StaticInst::nullStaticInstPtr);
virtual std::string describe() const;
};
@@ -400,8 +400,8 @@ namespace X86ISA
X86Interrupt("INIT Interrupt", "#INIT", _vector)
{}
- void invoke(ThreadContext * tc,
- StaticInstPtr inst = StaticInst::nullStaticInstPtr);
+ void invoke(ThreadContext * tc, const StaticInstPtr &inst =
+ StaticInst::nullStaticInstPtr);
};
class StartupInterrupt : public X86Interrupt
@@ -411,8 +411,8 @@ namespace X86ISA
X86Interrupt("Startup Interrupt", "#SIPI", _vector)
{}
- void invoke(ThreadContext * tc,
- StaticInstPtr inst = StaticInst::nullStaticInstPtr);
+ void invoke(ThreadContext * tc, const StaticInstPtr &inst =
+ StaticInst::nullStaticInstPtr);
};
class SoftwareInterrupt : public X86Interrupt
diff --git a/src/arch/x86/stacktrace.cc b/src/arch/x86/stacktrace.cc
index 636f74123..d887ac293 100644
--- a/src/arch/x86/stacktrace.cc
+++ b/src/arch/x86/stacktrace.cc
@@ -121,7 +121,7 @@ namespace X86ISA
{
}
- StackTrace::StackTrace(ThreadContext *_tc, StaticInstPtr inst)
+ StackTrace::StackTrace(ThreadContext *_tc, const StaticInstPtr &inst)
: tc(0), stack(64)
{
trace(_tc, inst);
diff --git a/src/arch/x86/stacktrace.hh b/src/arch/x86/stacktrace.hh
index e9d6900d8..a17f4ef80 100644
--- a/src/arch/x86/stacktrace.hh
+++ b/src/arch/x86/stacktrace.hh
@@ -75,7 +75,7 @@ namespace X86ISA
public:
StackTrace();
- StackTrace(ThreadContext *tc, StaticInstPtr inst);
+ StackTrace(ThreadContext *tc, const StaticInstPtr &inst);
~StackTrace();
void clear()
@@ -85,7 +85,7 @@ namespace X86ISA
}
bool valid() const { return tc != NULL; }
- bool trace(ThreadContext *tc, StaticInstPtr inst);
+ bool trace(ThreadContext *tc, const StaticInstPtr &inst);
public:
const std::vector<Addr> &getstack() const { return stack; }
@@ -107,7 +107,7 @@ namespace X86ISA
};
inline bool
- StackTrace::trace(ThreadContext *tc, StaticInstPtr inst)
+ StackTrace::trace(ThreadContext *tc, const StaticInstPtr &inst)
{
if (!inst->isCall() && !inst->isReturn())
return false;
diff --git a/src/arch/x86/utility.hh b/src/arch/x86/utility.hh
index 046b959db..9be66d8d2 100644
--- a/src/arch/x86/utility.hh
+++ b/src/arch/x86/utility.hh
@@ -94,7 +94,7 @@ namespace X86ISA
void skipFunction(ThreadContext *tc);
inline void
- advancePC(PCState &pc, const StaticInstPtr inst)
+ advancePC(PCState &pc, const StaticInstPtr &inst)
{
inst->advancePC(pc);
}