diff options
Diffstat (limited to 'src/cpu/o3/thread_context.hh')
-rwxr-xr-x | src/cpu/o3/thread_context.hh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cpu/o3/thread_context.hh b/src/cpu/o3/thread_context.hh index 520f07b0f..c6fa178b5 100755 --- a/src/cpu/o3/thread_context.hh +++ b/src/cpu/o3/thread_context.hh @@ -257,6 +257,16 @@ class O3ThreadContext : public ThreadContext { return this->thread->quiesceEvent; } + /** check if the cpu is currently in state update mode and squash if not. + * This function will return true if a trap is pending or if a fault or + * similar is currently writing to the thread context and doesn't want + * reset all the state (see noSquashFromTC). + */ + inline void conditionalSquash() + { + if (!thread->trapPending && !thread->noSquashFromTC) + cpu->squashFromTC(thread->threadId()); + } }; |