Deleted Added
sdiff udiff text old ( 8068:749581c26e71 ) new ( 8137:48371b9fb929 )
full compact
1/*
2 * Copyright (c) 2010 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

536 // Send back the squash signal to tell stages that they should
537 // squash.
538 toIEW->commitInfo[tid].squash = true;
539
540 // Send back the rob squashing signal so other stages know that
541 // the ROB is in the process of squashing.
542 toIEW->commitInfo[tid].robSquashing = true;
543
544 toIEW->commitInfo[tid].branchMispredict = false;
545 toIEW->commitInfo[tid].mispredictInst = NULL;
546
547 toIEW->commitInfo[tid].pc = pc[tid];
548}
549
550template <class Impl>
551void
552DefaultCommit<Impl>::squashFromTrap(ThreadID tid)
553{

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

579 commitStatus[tid] = ROBSquashing;
580 cpu->activityThisCycle();
581
582 tcSquash[tid] = false;
583}
584
585template <class Impl>
586void
587DefaultCommit<Impl>::squashAfter(ThreadID tid, uint64_t squash_after_seq_num)
588{
589 youngestSeqNum[tid] = squash_after_seq_num;
590
591 rob->squash(squash_after_seq_num, tid);
592 changedROBNumEntries[tid] = true;
593
594 // Send back the sequence number of the squashed instruction.
595 toIEW->commitInfo[tid].doneSeqNum = squash_after_seq_num;
596
597 // Send back the squash signal to tell stages that they should squash.
598 toIEW->commitInfo[tid].squash = true;
599
600 // Send back the rob squashing signal so other stages know that
601 // the ROB is in the process of squashing.
602 toIEW->commitInfo[tid].robSquashing = true;
603
604 toIEW->commitInfo[tid].branchMispredict = false;
605
606 toIEW->commitInfo[tid].pc = pc[tid];
607 DPRINTF(Commit, "Executing squash after for [tid:%i] inst [sn:%lli]\n",
608 tid, squash_after_seq_num);
609 commitStatus[tid] = ROBSquashing;
610}
611
612template <class Impl>

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

796
797 // Squashed sequence number must be older than youngest valid
798 // instruction in the ROB. This prevents squashes from younger
799 // instructions overriding squashes from older instructions.
800 if (fromIEW->squash[tid] &&
801 commitStatus[tid] != TrapPending &&
802 fromIEW->squashedSeqNum[tid] <= youngestSeqNum[tid]) {
803
804 DPRINTF(Commit, "[tid:%i]: Squashing due to PC %#x [sn:%i]\n",
805 tid,
806 fromIEW->mispredPC[tid],
807 fromIEW->squashedSeqNum[tid]);
808
809 DPRINTF(Commit, "[tid:%i]: Redirecting to PC %#x\n",
810 tid,
811 fromIEW->pc[tid].nextInstAddr());
812
813 commitStatus[tid] = ROBSquashing;
814
815 // If we want to include the squashing instruction in the squash,

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

830 toIEW->commitInfo[tid].doneSeqNum = squashed_inst;
831
832 toIEW->commitInfo[tid].squash = true;
833
834 // Send back the rob squashing signal so other stages know that
835 // the ROB is in the process of squashing.
836 toIEW->commitInfo[tid].robSquashing = true;
837
838 toIEW->commitInfo[tid].branchMispredict =
839 fromIEW->branchMispredict[tid];
840 toIEW->commitInfo[tid].mispredictInst =
841 fromIEW->mispredictInst[tid];
842 toIEW->commitInfo[tid].branchTaken =
843 fromIEW->branchTaken[tid];
844
845 toIEW->commitInfo[tid].pc = fromIEW->pc[tid];
846
847 toIEW->commitInfo[tid].mispredPC = fromIEW->mispredPC[tid];
848
849 if (toIEW->commitInfo[tid].branchMispredict) {
850 ++branchMispredicts;
851 }
852 }
853
854 }
855
856 setNextStatus();
857

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

983 TheISA::advancePC(pc[tid], head_inst->staticInst);
984
985 // Keep track of the last sequence number commited
986 lastCommitedSeqNum[tid] = head_inst->seqNum;
987
988 // If this is an instruction that doesn't play nicely with
989 // others squash everything and restart fetch
990 if (head_inst->isSquashAfter())
991 squashAfter(tid, head_inst->seqNum);
992
993 int count = 0;
994 Addr oldpc;
995 // Debug statement. Checks to make sure we're not
996 // currently updating state while handling PC events.
997 assert(!thread[tid]->inSyscall && !thread[tid]->trapPending);
998 do {
999 oldpc = pc[tid].instAddr();

--- 470 unchanged lines hidden ---