cpu: added assertions to ensure the correct proxies are used
This commit is contained in:
parent
11b725c19d
commit
4a52a6ea2d
|
@ -122,6 +122,30 @@ ThreadState::initMemProxies(ThreadContext *tc)
|
|||
}
|
||||
}
|
||||
|
||||
PortProxy &
|
||||
ThreadState::getPhysProxy()
|
||||
{
|
||||
assert(FullSystem);
|
||||
assert(physProxy != NULL);
|
||||
return *physProxy;
|
||||
}
|
||||
|
||||
FSTranslatingPortProxy &
|
||||
ThreadState::getVirtProxy()
|
||||
{
|
||||
assert(FullSystem);
|
||||
assert(virtProxy != NULL);
|
||||
return *virtProxy;
|
||||
}
|
||||
|
||||
SETranslatingPortProxy &
|
||||
ThreadState::getMemProxy()
|
||||
{
|
||||
assert(!FullSystem);
|
||||
assert(proxy != NULL);
|
||||
return *proxy;
|
||||
}
|
||||
|
||||
void
|
||||
ThreadState::profileClear()
|
||||
{
|
||||
|
|
|
@ -99,13 +99,13 @@ struct ThreadState {
|
|||
|
||||
TheISA::Kernel::Statistics *getKernelStats() { return kernelStats; }
|
||||
|
||||
PortProxy &getPhysProxy() { return *physProxy; }
|
||||
PortProxy &getPhysProxy();
|
||||
|
||||
FSTranslatingPortProxy &getVirtProxy() { return *virtProxy; }
|
||||
FSTranslatingPortProxy &getVirtProxy();
|
||||
|
||||
Process *getProcessPtr() { return process; }
|
||||
|
||||
SETranslatingPortProxy &getMemProxy() { return *proxy; }
|
||||
SETranslatingPortProxy &getMemProxy();
|
||||
|
||||
/** Reads the number of instructions functionally executed and
|
||||
* committed.
|
||||
|
|
Loading…
Reference in a new issue