diff options
author | Ali Saidi <Ali.Saidi@ARM.com> | 2013-01-07 13:05:33 -0500 |
---|---|---|
committer | Ali Saidi <Ali.Saidi@ARM.com> | 2013-01-07 13:05:33 -0500 |
commit | 5146a69835bc9ba37fba7d3b0ff72ecaf9b98b74 (patch) | |
tree | 694786d4ffd6384a3736d48e1fd20e29408bf56d /src/cpu/ozone/lw_back_end_impl.hh | |
parent | 90bd20aae2bc940397628a4598b5b25f2c8549b5 (diff) | |
download | gem5-5146a69835bc9ba37fba7d3b0ff72ecaf9b98b74.tar.xz |
cpu: rename the misleading inSyscall to noSquashFromTC
isSyscall was originally created because during handling of a syscall in SE
mode the threadcontext had to be updated. However, in many places this is used
in FS mode (e.g. fault handlers) and the name doesn't make much sense. The
boolean actually stops gem5 from squashing speculative and non-committed state
when a write to a threadcontext happens, so re-name the variable to something
more appropriate
Diffstat (limited to 'src/cpu/ozone/lw_back_end_impl.hh')
-rw-r--r-- | src/cpu/ozone/lw_back_end_impl.hh | 18 |
1 files changed, 9 insertions, 9 deletions
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; } |