summaryrefslogtreecommitdiff
path: root/src/cpu/simple
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/simple')
-rw-r--r--src/cpu/simple/atomic.cc4
-rw-r--r--src/cpu/simple/atomic.hh2
-rw-r--r--src/cpu/simple/base.hh4
-rw-r--r--src/cpu/simple/exec_context.hh8
-rw-r--r--src/cpu/simple/timing.cc5
-rw-r--r--src/cpu/simple/timing.hh2
6 files changed, 13 insertions, 12 deletions
diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc
index a873e6de7..9052cee2e 100644
--- a/src/cpu/simple/atomic.cc
+++ b/src/cpu/simple/atomic.cc
@@ -566,7 +566,7 @@ AtomicSimpleCPU::writeMem(uint8_t *data, unsigned size, Addr addr,
Fault
AtomicSimpleCPU::amoMem(Addr addr, uint8_t* data, unsigned size,
- Request::Flags flags, AtomicOpFunctor *amo_op)
+ Request::Flags flags, AtomicOpFunctorPtr amo_op)
{
SimpleExecContext& t_info = *threadInfo[curThread];
SimpleThread* thread = t_info.thread;
@@ -596,7 +596,7 @@ AtomicSimpleCPU::amoMem(Addr addr, uint8_t* data, unsigned size,
req->taskId(taskId());
req->setVirt(0, addr, size, flags, dataMasterId(),
- thread->pcState().instAddr(), amo_op);
+ thread->pcState().instAddr(), std::move(amo_op));
// translate to physical address
Fault fault = thread->dtb->translateAtomic(req, thread->getTC(),
diff --git a/src/cpu/simple/atomic.hh b/src/cpu/simple/atomic.hh
index 69ac09e4c..121cecd65 100644
--- a/src/cpu/simple/atomic.hh
+++ b/src/cpu/simple/atomic.hh
@@ -227,7 +227,7 @@ class AtomicSimpleCPU : public BaseSimpleCPU
override;
Fault amoMem(Addr addr, uint8_t* data, unsigned size,
- Request::Flags flags, AtomicOpFunctor *amo_op) override;
+ Request::Flags flags, AtomicOpFunctorPtr amo_op) override;
void regProbePoints() override;
diff --git a/src/cpu/simple/base.hh b/src/cpu/simple/base.hh
index 5404e5df8..f8e534c85 100644
--- a/src/cpu/simple/base.hh
+++ b/src/cpu/simple/base.hh
@@ -162,12 +162,12 @@ class BaseSimpleCPU : public BaseCPU
virtual Fault amoMem(Addr addr, uint8_t* data, unsigned size,
Request::Flags flags,
- AtomicOpFunctor *amo_op)
+ AtomicOpFunctorPtr amo_op)
{ panic("amoMem() is not implemented\n"); }
virtual Fault initiateMemAMO(Addr addr, unsigned size,
Request::Flags flags,
- AtomicOpFunctor *amo_op)
+ AtomicOpFunctorPtr amo_op)
{ panic("initiateMemAMO() is not implemented\n"); }
void countInst();
diff --git a/src/cpu/simple/exec_context.hh b/src/cpu/simple/exec_context.hh
index de98d6efd..91f7ec526 100644
--- a/src/cpu/simple/exec_context.hh
+++ b/src/cpu/simple/exec_context.hh
@@ -463,16 +463,16 @@ class SimpleExecContext : public ExecContext {
}
Fault amoMem(Addr addr, uint8_t *data, unsigned int size,
- Request::Flags flags, AtomicOpFunctor *amo_op) override
+ Request::Flags flags, AtomicOpFunctorPtr amo_op) override
{
- return cpu->amoMem(addr, data, size, flags, amo_op);
+ return cpu->amoMem(addr, data, size, flags, std::move(amo_op));
}
Fault initiateMemAMO(Addr addr, unsigned int size,
Request::Flags flags,
- AtomicOpFunctor *amo_op) override
+ AtomicOpFunctorPtr amo_op) override
{
- return cpu->initiateMemAMO(addr, size, flags, amo_op);
+ return cpu->initiateMemAMO(addr, size, flags, std::move(amo_op));
}
/**
diff --git a/src/cpu/simple/timing.cc b/src/cpu/simple/timing.cc
index 4aa008e33..d05eece27 100644
--- a/src/cpu/simple/timing.cc
+++ b/src/cpu/simple/timing.cc
@@ -564,7 +564,7 @@ TimingSimpleCPU::writeMem(uint8_t *data, unsigned size,
Fault
TimingSimpleCPU::initiateMemAMO(Addr addr, unsigned size,
Request::Flags flags,
- AtomicOpFunctor *amo_op)
+ AtomicOpFunctorPtr amo_op)
{
SimpleExecContext &t_info = *threadInfo[curThread];
SimpleThread* thread = t_info.thread;
@@ -579,7 +579,8 @@ TimingSimpleCPU::initiateMemAMO(Addr addr, unsigned size,
traceData->setMem(addr, size, flags);
RequestPtr req = make_shared<Request>(asid, addr, size, flags,
- dataMasterId(), pc, thread->contextId(), amo_op);
+ dataMasterId(), pc, thread->contextId(),
+ std::move(amo_op));
assert(req->hasAtomicOpFunctor());
diff --git a/src/cpu/simple/timing.hh b/src/cpu/simple/timing.hh
index 53e0ed7e1..27faa177a 100644
--- a/src/cpu/simple/timing.hh
+++ b/src/cpu/simple/timing.hh
@@ -293,7 +293,7 @@ class TimingSimpleCPU : public BaseSimpleCPU
override;
Fault initiateMemAMO(Addr addr, unsigned size, Request::Flags flags,
- AtomicOpFunctor *amo_op) override;
+ AtomicOpFunctorPtr amo_op) override;
void fetch();
void sendFetch(const Fault &fault,