Deleted Added
sdiff udiff text old ( 4405:57af43e114b5 ) new ( 4632:be5b8f67b8fb )
full compact
1/*
2 * Copyright (c) 2004-2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 627 unchanged lines hidden (view full) ---

636 if (interrupt != NoFault) {
637 // Wait until the ROB is empty and all stores have drained in
638 // order to enter the interrupt.
639 if (rob->isEmpty() && !iewStage->hasStoresToWB()) {
640 // Squash or record that I need to squash this cycle if
641 // an interrupt needed to be handled.
642 DPRINTF(Commit, "Interrupt detected.\n");
643
644 Fault new_interrupt = cpu->getInterrupts();
645 assert(new_interrupt != NoFault);
646
647 // Clear the interrupt now that it's going to be handled
648 toIEW->commitInfo[0].clearInterrupt = true;
649
650 assert(!thread[0]->inSyscall);
651 thread[0]->inSyscall = true;
652
653 // CPU will handle interrupt.
654 cpu->processInterrupts(interrupt);

--- 81 unchanged lines hidden (view full) ---

736 fromIEW->nextPC[tid]);
737
738 commitStatus[tid] = ROBSquashing;
739
740 // If we want to include the squashing instruction in the squash,
741 // then use one older sequence number.
742 InstSeqNum squashed_inst = fromIEW->squashedSeqNum[tid];
743
744 if (fromIEW->includeSquashInst[tid] == true) {
745 squashed_inst--;
746 }
747
748 // All younger instructions will be squashed. Set the sequence
749 // number as the youngest instruction in the ROB.
750 youngestSeqNum[tid] = squashed_inst;
751
752 rob->squash(squashed_inst, tid);
753 changedROBNumEntries[tid] = true;
754
755 toIEW->commitInfo[tid].doneSeqNum = squashed_inst;
756
757 toIEW->commitInfo[tid].squash = true;
758
759 // Send back the rob squashing signal so other stages know that
760 // the ROB is in the process of squashing.

--- 20 unchanged lines hidden (view full) ---

781 setNextStatus();
782
783 if (squashCounter != numThreads) {
784 // If we're not currently squashing, then get instructions.
785 getInsts();
786
787 // Try to commit any instructions.
788 commitInsts();
789 }
790
791 //Check for any activity
792 threads = activeThreads->begin();
793
794 while (threads != end) {
795 unsigned tid = *threads++;
796

--- 335 unchanged lines hidden (view full) ---

1132}
1133
1134template <class Impl>
1135void
1136DefaultCommit<Impl>::getInsts()
1137{
1138 DPRINTF(Commit, "Getting instructions from Rename stage.\n");
1139
1140 // Read any renamed instructions and place them into the ROB.
1141 int insts_to_process = std::min((int)renameWidth, fromRename->size);
1142
1143 for (int inst_num = 0; inst_num < insts_to_process; ++inst_num) {
1144 DynInstPtr inst;
1145
1146 inst = fromRename->insts[inst_num];
1147 int tid = inst->threadNumber;
1148
1149 if (!inst->isSquashed() &&
1150 commitStatus[tid] != ROBSquashing &&
1151 commitStatus[tid] != TrapPending) {
1152 changedROBNumEntries[tid] = true;
1153
1154 DPRINTF(Commit, "Inserting PC %#x [sn:%i] [tid:%i] into ROB.\n",

--- 5 unchanged lines hidden (view full) ---

1160
1161 youngestSeqNum[tid] = inst->seqNum;
1162 } else {
1163 DPRINTF(Commit, "Instruction PC %#x [sn:%i] [tid:%i] was "
1164 "squashed, skipping.\n",
1165 inst->readPC(), inst->seqNum, tid);
1166 }
1167 }
1168}
1169
1170template <class Impl>
1171void
1172DefaultCommit<Impl>::skidInsert()
1173{
1174 DPRINTF(Commit, "Attempting to any instructions from rename into "
1175 "skidBuffer.\n");

--- 205 unchanged lines hidden ---