thread->getTC()));
#endif
-#if FULL_SYSTEM
- thread->setInst(machInst);
-#endif // FULL_SYSTEM
-
fault = inst->getFault();
}
int threadId() { return actualTC->threadId(); }
- // @todo: Do I need this?
- MachInst getInst() { return actualTC->getInst(); }
-
// @todo: Do I need this?
void copyArchRegs(ThreadContext *tc)
{
panic("unserialize unimplemented");
}
-TheISA::MachInst
-InOrderThreadContext:: getInst()
-{
- return thread->getInst();
-}
-
void
InOrderThreadContext::copyArchRegs(ThreadContext *src_tc)
/** Returns this thread's ID number. */
int getThreadNum() { return thread->readTid(); }
- /** Returns the instruction this thread is currently committing.
- * Only used when an instruction faults.
- */
- TheISA::MachInst getInst();
-
/** Copies the architectural registers from another TC into this TC. */
void copyArchRegs(ThreadContext *src_tc);
}
#endif
- // DTB will sometimes need the machine instruction for when
- // faults happen. So we will set it here, prior to the DTB
- // possibly needing it for its fault.
- thread[tid]->setInst(
- static_cast<TheISA::MachInst>(head_inst->staticInst->machInst));
-
if (inst_fault != NoFault) {
DPRINTF(Commit, "Inst [sn:%lli] PC %#x has a fault\n",
head_inst->seqNum, head_inst->readPC());
/** Samples the function profiling information. */
virtual void profileSample();
#endif
- /** Returns the instruction this thread is currently committing.
- * Only used when an instruction faults.
- */
- virtual TheISA::MachInst getInst();
/** Copies the architectural registers from another TC into this TC. */
virtual void copyArchRegs(ThreadContext *tc);
}
#endif
-template <class Impl>
-TheISA::MachInst
-O3ThreadContext<Impl>:: getInst()
-{
- return thread->getInst();
-}
-
template <class Impl>
void
O3ThreadContext<Impl>::copyArchRegs(ThreadContext *tc)
int threadId();
- // Also somewhat obnoxious. Really only used for the TLB fault.
- TheISA::MachInst getInst();
-
void copyArchRegs(ThreadContext *tc);
void clearArchRegs();
setCpuId(old_context->cpuId());
setContextId(old_context->contextId());
- thread->setInst(old_context->getInst());
#if !FULL_SYSTEM
setFuncExeInst(old_context->readFuncExeInst());
#else
return thread->threadId();
}
-template <class Impl>
-TheISA::MachInst
-OzoneCPU<Impl>::OzoneTC::getInst()
-{
- return thread->getInst();
-}
-
template <class Impl>
void
OzoneCPU<Impl>::OzoneTC::copyArchRegs(ThreadContext *tc)
thread->inSyscall = true;
- // Hack for now; DTB will sometimes need the machine instruction
- // for when faults happen. So we will set it here, prior to the
- // DTB possibly needing it for this translation.
- thread->setInst(
- static_cast<TheISA::MachInst>(inst->staticInst->machInst));
-
// Consider holding onto the trap and waiting until the trap event
// happens for this to be executed.
inst_fault->invoke(xc);
}
#endif
- thread->setInst(
- static_cast<TheISA::MachInst>(inst->staticInst->machInst));
-
handleFault(inst_fault);
return false;
}
DPRINTF(Decode,"Decode: Decoded %s instruction: 0x%x\n",
curStaticInst->getName(), curStaticInst->machInst);
#endif // TRACING_ON
-
-#if FULL_SYSTEM
- thread->setInst(inst);
-#endif // FULL_SYSTEM
}
}
#if !FULL_SYSTEM
funcExeInst = oldContext->readFuncExeInst();
#endif
- inst = oldContext->getInst();
_threadId = oldContext->threadId();
_contextId = oldContext->contextId();
virtual void profileSample() = 0;
#endif
- // Also somewhat obnoxious. Really only used for the TLB fault.
- // However, may be quite useful in SPARC.
- virtual TheISA::MachInst getInst() = 0;
-
virtual void copyArchRegs(ThreadContext *tc) = 0;
virtual void clearArchRegs() = 0;
void profileClear() { return actualTC->profileClear(); }
void profileSample() { return actualTC->profileSample(); }
#endif
- // @todo: Do I need this?
- MachInst getInst() { return actualTC->getInst(); }
// @todo: Do I need this?
void copyArchRegs(ThreadContext *tc) { actualTC->copyArchRegs(tc); }
SERIALIZE_ENUM(_status);
// thread_num and cpu_id are deterministic from the config
SERIALIZE_SCALAR(funcExeInst);
- SERIALIZE_SCALAR(inst);
#if FULL_SYSTEM
Tick quiesceEndTick = 0;
UNSERIALIZE_ENUM(_status);
// thread_num and cpu_id are deterministic from the config
UNSERIALIZE_SCALAR(funcExeInst);
- UNSERIALIZE_SCALAR(inst);
#if FULL_SYSTEM
Tick quiesceEndTick;
void setMemPort(TranslatingPort *_port) { port = _port; }
#endif
- /** Sets the current instruction being committed. */
- void setInst(TheISA::MachInst _inst) { inst = _inst; }
-
- /** Returns the current instruction being committed. */
- TheISA::MachInst getInst() { return inst; }
-
/** Reads the number of instructions functionally executed and
* committed.
*/
Process *process;
#endif
- /** Current instruction the thread is committing. Only set and
- * used for DTB faults currently.
- */
- TheISA::MachInst inst;
-
public:
/**
* Temporary storage to pass the source address from copy_load to