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].mispredictInst = NULL;
545 toIEW->commitInfo[tid].squashInst = 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, DynInstPtr &head_inst,
588 uint64_t squash_after_seq_num)
589{
590 youngestSeqNum[tid] = squash_after_seq_num;
591
592 rob->squash(squash_after_seq_num, tid);
593 changedROBNumEntries[tid] = true;
594
595 // Send back the sequence number of the squashed instruction.
596 toIEW->commitInfo[tid].doneSeqNum = squash_after_seq_num;
597
598 toIEW->commitInfo[tid].squashInst = head_inst;
599 // Send back the squash signal to tell stages that they should squash.
600 toIEW->commitInfo[tid].squash = true;
601
602 // Send back the rob squashing signal so other stages know that
603 // the ROB is in the process of squashing.
604 toIEW->commitInfo[tid].robSquashing = true;
605
606 toIEW->commitInfo[tid].mispredictInst = NULL;
607
608 toIEW->commitInfo[tid].pc = pc[tid];
609 DPRINTF(Commit, "Executing squash after for [tid:%i] inst [sn:%lli]\n",
610 tid, squash_after_seq_num);
611 commitStatus[tid] = ROBSquashing;
612}
613
614template <class Impl>

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

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

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

839 toIEW->commitInfo[tid].doneSeqNum = squashed_inst;
840
841 toIEW->commitInfo[tid].squash = true;
842
843 // Send back the rob squashing signal so other stages know that
844 // the ROB is in the process of squashing.
845 toIEW->commitInfo[tid].robSquashing = true;
846
847 toIEW->commitInfo[tid].mispredictInst =
848 fromIEW->mispredictInst[tid];
849 toIEW->commitInfo[tid].branchTaken =
850 fromIEW->branchTaken[tid];
851 toIEW->commitInfo[tid].squashInst = NULL;
852
853 toIEW->commitInfo[tid].pc = fromIEW->pc[tid];
854
855 if (toIEW->commitInfo[tid].mispredictInst) {
856 ++branchMispredicts;
857 }
858 }
859
860 }
861
862 setNextStatus();
863

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

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

--- 470 unchanged lines hidden ---