484,485c484,490
< bool branch_taken = inst->readNextNPC() !=
< (inst->readNextPC() + sizeof(TheISA::MachInst));
---
> int instSize = sizeof(TheISA::MachInst);
> bool branch_taken =
> !(inst->readNextPC() + instSize == inst->readNextNPC() &&
> (inst->readNextPC() == inst->readPC() + instSize ||
> inst->readNextPC() == inst->readPC() + 2 * instSize));
> DPRINTF(Sparc, "Branch taken = %s [sn:%i]\n",
> branch_taken ? "true": "false", inst->seqNum);
489,491c494,502
< toCommit->condDelaySlotBranch[tid] = inst->isCondDelaySlot();
<
< if (inst->isCondDelaySlot() && branch_taken) {
---
> bool squashDelaySlot = true;
> // (inst->readNextPC() != inst->readPC() + sizeof(TheISA::MachInst));
> DPRINTF(Sparc, "Squash delay slot = %s [sn:%i]\n",
> squashDelaySlot ? "true": "false", inst->seqNum);
> toCommit->squashDelaySlot[tid] = squashDelaySlot;
> //If we're squashing the delay slot, we need to pick back up at NextPC.
> //Otherwise, NextPC isn't being squashed, so we should pick back up at
> //NextNPC.
> if (squashDelaySlot) {
493c504,505
< } else {
---
> toCommit->nextNPC[tid] = inst->readNextNPC();
> } else
495d506
< }
516a528,530
> #if ISA_HAS_DELAY_SLOT
> toCommit->nextNPC[tid] = inst->readNextNPC();
> #endif
533a548,550
> #if ISA_HAS_DELAY_SLOT
> toCommit->nextNPC[tid] = inst->readNextNPC();
> #endif
674,675c691
< std::list<unsigned>::iterator threads = activeThreads->begin();
< std::list<unsigned>::iterator end = activeThreads->end();
---
> std::list<unsigned>::iterator threads = (*activeThreads).begin();
677,679c693,694
< while (threads != end) {
< unsigned tid = *threads++;
< unsigned thread_count = skidBuffer[tid].size();
---
> while (threads != (*activeThreads).end()) {
> unsigned thread_count = skidBuffer[*threads++].size();
691,692c706
< std::list<unsigned>::iterator threads = activeThreads->begin();
< std::list<unsigned>::iterator end = activeThreads->end();
---
> std::list<unsigned>::iterator threads = (*activeThreads).begin();
694,697c708,709
< while (threads != end) {
< unsigned tid = *threads++;
<
< if (!skidBuffer[tid].empty())
---
> while (threads != (*activeThreads).end()) {
> if (!skidBuffer[*threads++].empty())
710,711c722
< std::list<unsigned>::iterator threads = activeThreads->begin();
< std::list<unsigned>::iterator end = activeThreads->end();
---
> std::list<unsigned>::iterator threads = (*activeThreads).begin();
713c724,726
< while (threads != end) {
---
> threads = (*activeThreads).begin();
>
> while (threads != (*activeThreads).end()) {
1126a1140
> #if FULL_SYSTEM
1131a1146
> #endif
1231,1232c1246
< std::list<unsigned>::iterator threads = activeThreads->begin();
< std::list<unsigned>::iterator end = activeThreads->end();
---
> std::list<unsigned>::iterator threads = (*activeThreads).begin();
1234c1248
< while (threads != end) {
---
> while (threads != (*activeThreads).end()) {
1343a1358
> DPRINTF(IEW, "Predicted target was %#x.\n", inst->predPC);
1354c1369
< if (inst->predTaken()) {
---
> if (inst->readPredTaken()) {
1475,1476c1490
< std::list<unsigned>::iterator threads = activeThreads->begin();
< std::list<unsigned>::iterator end = activeThreads->end();
---
> std::list<unsigned>::iterator threads = (*activeThreads).begin();
1479,1480c1493,1494
< while (threads != end) {
< unsigned tid = *threads++;
---
> while (threads != (*activeThreads).end()) {
> unsigned tid = *threads++;
1520,1521c1534,1535
< threads = activeThreads->begin();
< while (threads != end) {
---
> threads = (*activeThreads).begin();
> while (threads != (*activeThreads).end()) {