diff options
-rw-r--r-- | src/cpu/minor/execute.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/cpu/minor/execute.cc b/src/cpu/minor/execute.cc index d7cb475c6..234a233c2 100644 --- a/src/cpu/minor/execute.cc +++ b/src/cpu/minor/execute.cc @@ -248,7 +248,14 @@ Execute::tryToBranch(MinorDynInstPtr inst, Fault fault, BranchData &branch) pc_before, target); } - if (inst->predictedTaken && !force_branch) { + if (thread->status() == ThreadContext::Suspended) { + /* Thread got suspended */ + DPRINTF(Branch, "Thread got suspended: branch from 0x%x to 0x%x " + "inst: %s\n", + inst->pc.instAddr(), target.instAddr(), *inst); + + reason = BranchData::SuspendThread; + } else if (inst->predictedTaken && !force_branch) { /* Predicted to branch */ if (!must_branch) { /* No branch was taken, change stream to get us back to the @@ -1054,8 +1061,7 @@ Execute::commit(ThreadID thread_id, bool only_commit_microops, bool discard, !branch.isStreamChange() && /* No real branch */ fault == NoFault && /* No faults */ completed_inst && /* Still finding instructions to execute */ - num_insts_committed != commitLimit && /* Not reached commit limit */ - cpu.getContext(thread_id)->status() != ThreadContext::Suspended + num_insts_committed != commitLimit /* Not reached commit limit */ ) { if (only_commit_microops) { |