summaryrefslogtreecommitdiff
path: root/src/cpu/ozone
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/ozone')
-rw-r--r--src/cpu/ozone/back_end_impl.hh8
-rw-r--r--src/cpu/ozone/cpu_impl.hh26
-rw-r--r--src/cpu/ozone/dyn_inst_impl.hh12
-rw-r--r--src/cpu/ozone/inorder_back_end_impl.hh24
-rw-r--r--src/cpu/ozone/lw_back_end_impl.hh18
-rw-r--r--src/cpu/ozone/thread_state.hh6
6 files changed, 47 insertions, 47 deletions
diff --git a/src/cpu/ozone/back_end_impl.hh b/src/cpu/ozone/back_end_impl.hh
index 9c9ca311e..bcc897369 100644
--- a/src/cpu/ozone/back_end_impl.hh
+++ b/src/cpu/ozone/back_end_impl.hh
@@ -1513,16 +1513,16 @@ BackEnd<Impl>::commitInst(int inst_num)
DPRINTF(BE, "Inst [sn:%lli] PC %#x has a fault\n",
inst->seqNum, inst->readPC());
-// assert(!thread->inSyscall);
+// assert(!thread->noSquashFromTC);
-// thread->inSyscall = true;
+// thread->noSquashFromTC = true;
// Consider holding onto the trap and waiting until the trap event
// happens for this to be executed.
inst_fault->invoke(thread->getXCProxy());
// Exit state update mode to avoid accidental updating.
-// thread->inSyscall = false;
+// thread->noSquashFromTC = false;
// commitStatus = TrapPending;
@@ -1571,7 +1571,7 @@ BackEnd<Impl>::commitInst(int inst_num)
Addr oldpc;
do {
if (count == 0)
- assert(!thread->inSyscall && !thread->trapPending);
+ assert(!thread->noSquashFromTC && !thread->trapPending);
oldpc = thread->readPC();
cpu->system->pcEventQueue.service(
thread->getXCProxy());
diff --git a/src/cpu/ozone/cpu_impl.hh b/src/cpu/ozone/cpu_impl.hh
index 3a32c07c6..fe8ae2551 100644
--- a/src/cpu/ozone/cpu_impl.hh
+++ b/src/cpu/ozone/cpu_impl.hh
@@ -110,7 +110,7 @@ OzoneCPU<Impl>::OzoneCPU(Params *p)
ozoneTC.cpu = this;
ozoneTC.thread = &thread;
- thread.inSyscall = false;
+ thread.noSquashFromTC = false;
itb = p->itb;
dtb = p->dtb;
@@ -236,7 +236,7 @@ OzoneCPU<Impl>::takeOverFrom(BaseCPU *oldCPU)
BaseCPU::takeOverFrom(oldCPU);
thread.trapPending = false;
- thread.inSyscall = false;
+ thread.noSquashFromTC = false;
backEnd->takeOverFrom();
frontEnd->takeOverFrom();
@@ -375,7 +375,7 @@ OzoneCPU<Impl>::init()
BaseCPU::init();
// Mark this as in syscall so it won't need to squash
- thread.inSyscall = true;
+ thread.noSquashFromTC = true;
if (FullSystem) {
for (int i = 0; i < threadContexts.size(); ++i) {
ThreadContext *tc = threadContexts[i];
@@ -387,7 +387,7 @@ OzoneCPU<Impl>::init()
frontEnd->renameTable.copyFrom(thread.renameTable);
backEnd->renameTable.copyFrom(thread.renameTable);
- thread.inSyscall = false;
+ thread.noSquashFromTC = false;
}
template <class Impl>
@@ -476,7 +476,7 @@ template <class Impl>
void
OzoneCPU<Impl>::squashFromTC()
{
- thread.inSyscall = true;
+ thread.noSquashFromTC = true;
backEnd->generateTCEvent();
}
@@ -487,7 +487,7 @@ OzoneCPU<Impl>::syscall(uint64_t &callnum)
// Not sure this copy is needed, depending on how the TC proxy is made.
thread.renameTable.copyFrom(backEnd->renameTable);
- thread.inSyscall = true;
+ thread.noSquashFromTC = true;
thread.funcExeInst++;
@@ -497,7 +497,7 @@ OzoneCPU<Impl>::syscall(uint64_t &callnum)
thread.funcExeInst--;
- thread.inSyscall = false;
+ thread.noSquashFromTC = false;
frontEnd->renameTable.copyFrom(thread.renameTable);
backEnd->renameTable.copyFrom(thread.renameTable);
@@ -774,7 +774,7 @@ OzoneCPU<Impl>::OzoneTC::setIntReg(int reg_idx, uint64_t val)
{
thread->renameTable[reg_idx]->setIntResult(val);
- if (!thread->inSyscall) {
+ if (!thread->noSquashFromTC) {
cpu->squashFromTC();
}
}
@@ -787,7 +787,7 @@ OzoneCPU<Impl>::OzoneTC::setFloatReg(int reg_idx, FloatReg val)
thread->renameTable[idx]->setDoubleResult(val);
- if (!thread->inSyscall) {
+ if (!thread->noSquashFromTC) {
cpu->squashFromTC();
}
}
@@ -806,7 +806,7 @@ OzoneCPU<Impl>::OzoneTC::setPC(Addr val)
thread->PC = val;
cpu->frontEnd->setPC(val);
- if (!thread->inSyscall) {
+ if (!thread->noSquashFromTC) {
cpu->squashFromTC();
}
}
@@ -818,7 +818,7 @@ OzoneCPU<Impl>::OzoneTC::setNextPC(Addr val)
thread->nextPC = val;
cpu->frontEnd->setNextPC(val);
- if (!thread->inSyscall) {
+ if (!thread->noSquashFromTC) {
cpu->squashFromTC();
}
}
@@ -844,7 +844,7 @@ OzoneCPU<Impl>::OzoneTC::setMiscRegNoEffect(int misc_reg, const MiscReg &val)
// Needs to setup a squash event unless we're in syscall mode
thread->miscRegFile.setRegNoEffect(misc_reg, val);
- if (!thread->inSyscall) {
+ if (!thread->noSquashFromTC) {
cpu->squashFromTC();
}
}
@@ -856,7 +856,7 @@ OzoneCPU<Impl>::OzoneTC::setMiscReg(int misc_reg, const MiscReg &val)
// Needs to setup a squash event unless we're in syscall mode
thread->miscRegFile.setReg(misc_reg, val, this);
- if (!thread->inSyscall) {
+ if (!thread->noSquashFromTC) {
cpu->squashFromTC();
}
}
diff --git a/src/cpu/ozone/dyn_inst_impl.hh b/src/cpu/ozone/dyn_inst_impl.hh
index 96d326ffc..2066c58d7 100644
--- a/src/cpu/ozone/dyn_inst_impl.hh
+++ b/src/cpu/ozone/dyn_inst_impl.hh
@@ -71,12 +71,12 @@ OzoneDynInst<Impl>::execute()
// @todo: Pretty convoluted way to avoid squashing from happening when using
// the XC during an instruction's execution (specifically for instructions
// that have sideeffects that use the XC). Fix this.
- bool in_syscall = this->thread->inSyscall;
- this->thread->inSyscall = true;
+ bool no_squash_from_TC = this->thread->noSquashFromTC;
+ this->thread->noSquashFromTC = true;
this->fault = this->staticInst->execute(this, this->traceData);
- this->thread->inSyscall = in_syscall;
+ this->thread->noSquashFromTC = no_squash_from_TC;
return this->fault;
}
@@ -88,12 +88,12 @@ OzoneDynInst<Impl>::initiateAcc()
// @todo: Pretty convoluted way to avoid squashing from happening when using
// the XC during an instruction's execution (specifically for instructions
// that have sideeffects that use the XC). Fix this.
- bool in_syscall = this->thread->inSyscall;
- this->thread->inSyscall = true;
+ bool no_squash_from_TC = this->thread->noSquashFromTC;
+ this->thread->noSquashFromTC = true;
this->fault = this->staticInst->initiateAcc(this, this->traceData);
- this->thread->inSyscall = in_syscall;
+ this->thread->noSquashFromTC = no_squash_from_TC;
return this->fault;
}
diff --git a/src/cpu/ozone/inorder_back_end_impl.hh b/src/cpu/ozone/inorder_back_end_impl.hh
index 59d1dab0d..7bb876e4a 100644
--- a/src/cpu/ozone/inorder_back_end_impl.hh
+++ b/src/cpu/ozone/inorder_back_end_impl.hh
@@ -117,7 +117,7 @@ InorderBackEnd<Impl>::checkInterrupts()
}
if (ipl && ipl > thread->readMiscRegNoEffect(IPR_IPLR)) {
- thread->inSyscall = true;
+ thread->noSquashFromTC = true;
thread->setMiscRegNoEffect(IPR_ISR, summary);
thread->setMiscRegNoEffect(IPR_INTID, ipl);
@@ -128,7 +128,7 @@ InorderBackEnd<Impl>::checkInterrupts()
// May need to go 1 inst prior
squashPending = true;
- thread->inSyscall = false;
+ thread->noSquashFromTC = false;
setSquashInfoFromXC();
}
@@ -206,7 +206,7 @@ InorderBackEnd<Impl>::executeInsts()
Addr oldpc;
do {
if (count == 0)
- assert(!thread->inSyscall && !thread->trapPending);
+ assert(!thread->noSquashFromTC && !thread->trapPending);
oldpc = thread->readPC();
cpu->system->pcEventQueue.service(
thread->getXCProxy());
@@ -291,16 +291,16 @@ InorderBackEnd<Impl>::executeInsts()
DPRINTF(IBE, "Inst [sn:%lli] PC %#x has a fault\n",
inst->seqNum, inst->readPC());
- assert(!thread->inSyscall);
+ assert(!thread->noSquashFromTC);
- thread->inSyscall = true;
+ thread->noSquashFromTC = true;
// Consider holding onto the trap and waiting until the trap event
// happens for this to be executed.
inst_fault->invoke(xc);
// Exit state update mode to avoid accidental updating.
- thread->inSyscall = false;
+ thread->noSquashFromTC = false;
squashPending = true;
@@ -365,16 +365,16 @@ InorderBackEnd<Impl>::handleFault()
{
DPRINTF(Commit, "Handling fault from fetch\n");
- assert(!thread->inSyscall);
+ assert(!thread->noSquashFromTC);
- thread->inSyscall = true;
+ thread->noSquashFromTC = true;
// Consider holding onto the trap and waiting until the trap event
// happens for this to be executed.
faultFromFetch->invoke(xc);
// Exit state update mode to avoid accidental updating.
- thread->inSyscall = false;
+ thread->noSquashFromTC = false;
squashPending = true;
@@ -415,8 +415,8 @@ InorderBackEnd<Impl>::squash(const InstSeqNum &squash_num, const Addr &next_PC)
squashPending = false;
// Probably want to make sure that this squash is the one that set the
- // thread into inSyscall mode.
- thread->inSyscall = false;
+ // thread into noSquashFromTC mode.
+ thread->noSquashFromTC = false;
// Tell front end to squash, reset PC to new one.
frontEnd->squash(squash_num, next_PC);
@@ -431,7 +431,7 @@ InorderBackEnd<Impl>::squashFromXC()
// Record that I need to squash
squashPending = true;
- thread->inSyscall = true;
+ thread->noSquashFromTC = true;
}
template <class Impl>
diff --git a/src/cpu/ozone/lw_back_end_impl.hh b/src/cpu/ozone/lw_back_end_impl.hh
index cd23293b4..79ae43465 100644
--- a/src/cpu/ozone/lw_back_end_impl.hh
+++ b/src/cpu/ozone/lw_back_end_impl.hh
@@ -531,8 +531,8 @@ LWBackEnd<Impl>::checkInterrupts()
// Not sure which thread should be the one to interrupt. For now
// always do thread 0.
- assert(!thread->inSyscall);
- thread->inSyscall = true;
+ assert(!thread->noSquashFromTC);
+ thread->noSquashFromTC = true;
// CPU will handle implementation of the interrupt.
cpu->processInterrupts();
@@ -541,7 +541,7 @@ LWBackEnd<Impl>::checkInterrupts()
commitStatus = TrapPending;
// Exit state update mode to avoid accidental updating.
- thread->inSyscall = false;
+ thread->noSquashFromTC = false;
// Generate trap squash event.
generateTrapEvent();
@@ -559,16 +559,16 @@ LWBackEnd<Impl>::handleFault(Fault &fault, Tick latency)
{
DPRINTF(BE, "Handling fault!\n");
- assert(!thread->inSyscall);
+ assert(!thread->noSquashFromTC);
- thread->inSyscall = true;
+ thread->noSquashFromTC = true;
// Consider holding onto the trap and waiting until the trap event
// happens for this to be executed.
fault->invoke(thread->getTC());
// Exit state update mode to avoid accidental updating.
- thread->inSyscall = false;
+ thread->noSquashFromTC = false;
commitStatus = TrapPending;
@@ -1205,7 +1205,7 @@ LWBackEnd<Impl>::commitInst(int inst_num)
Addr oldpc;
do {
if (count == 0)
- assert(!thread->inSyscall && !thread->trapPending);
+ assert(!thread->noSquashFromTC && !thread->trapPending);
oldpc = thread->readPC();
cpu->system->pcEventQueue.service(
thread->getTC());
@@ -1357,7 +1357,7 @@ LWBackEnd<Impl>::squashFromTC()
frontEnd->interruptPending = false;
thread->trapPending = false;
- thread->inSyscall = false;
+ thread->noSquashFromTC = false;
tcSquash = false;
commitStatus = Running;
}
@@ -1373,7 +1373,7 @@ LWBackEnd<Impl>::squashFromTrap()
frontEnd->interruptPending = false;
thread->trapPending = false;
- thread->inSyscall = false;
+ thread->noSquashFromTC = false;
trapSquash = false;
commitStatus = Running;
}
diff --git a/src/cpu/ozone/thread_state.hh b/src/cpu/ozone/thread_state.hh
index 98ecd850c..0c03155b8 100644
--- a/src/cpu/ozone/thread_state.hh
+++ b/src/cpu/ozone/thread_state.hh
@@ -65,7 +65,7 @@ struct OzoneThreadState : public ThreadState {
OzoneThreadState(CPUType *_cpu, int _thread_num)
: ThreadState(_cpu, -1, _thread_num),
- intrflag(0), cpu(_cpu), inSyscall(0), trapPending(0)
+ intrflag(0), cpu(_cpu), noSquashFromTC(false), trapPending(false)
{
if (cpu->params->profile) {
profile = new FunctionProfile(cpu->params->system->kernelSymtab);
@@ -85,7 +85,7 @@ struct OzoneThreadState : public ThreadState {
OzoneThreadState(CPUType *_cpu, int _thread_num, Process *_process)
: ThreadState(_cpu, -1, _thread_num, _process),
- cpu(_cpu), inSyscall(0), trapPending(0)
+ cpu(_cpu), noSquashFromTC(false), trapPending(false)
{
miscRegFile.clear();
}
@@ -102,7 +102,7 @@ struct OzoneThreadState : public ThreadState {
typename Impl::CPUType *cpu;
- bool inSyscall;
+ bool noSquashFromTC;
bool trapPending;