Deleted Added
sdiff udiff text old ( 3221:669a04468c0d ) new ( 3732:e84a6e9ebd3d )
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;

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

509DefaultIEW<Impl>::squashDueToMemOrder(DynInstPtr &inst, unsigned tid)
510{
511 DPRINTF(IEW, "[tid:%i]: Squashing from a specific instruction, "
512 "PC: %#x [sn:%i].\n", tid, inst->readPC(), inst->seqNum);
513
514 toCommit->squash[tid] = true;
515 toCommit->squashedSeqNum[tid] = inst->seqNum;
516 toCommit->nextPC[tid] = inst->readNextPC();
517
518 toCommit->includeSquashInst[tid] = false;
519
520 wroteToTimeBuffer = true;
521}
522
523template<class Impl>
524void
525DefaultIEW<Impl>::squashDueToMemBlocked(DynInstPtr &inst, unsigned tid)
526{
527 DPRINTF(IEW, "[tid:%i]: Memory blocked, squashing load and younger insts, "
528 "PC: %#x [sn:%i].\n", tid, inst->readPC(), inst->seqNum);
529
530 toCommit->squash[tid] = true;
531 toCommit->squashedSeqNum[tid] = inst->seqNum;
532 toCommit->nextPC[tid] = inst->readPC();
533
534 // Must include the broadcasted SN in the squash.
535 toCommit->includeSquashInst[tid] = true;
536
537 ldstQueue.setLoadBlockedHandled(tid);
538
539 wroteToTimeBuffer = true;
540}

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

1286 // If the store had a fault then it may not have a mem req
1287 if (!inst->isStoreConditional() && fault == NoFault) {
1288 inst->setExecuted();
1289
1290 instToCommit(inst);
1291 } else if (fault != NoFault) {
1292 // If the instruction faulted, then we need to send it along to commit
1293 // without the instruction completing.
1294 DPRINTF(IEW, "Store has fault! [sn:%lli]\n", inst->seqNum);
1295
1296 // Send this instruction to commit, also make sure iew stage
1297 // realizes there is activity.
1298 inst->setExecuted();
1299
1300 instToCommit(inst);
1301 activityThisCycle();
1302 }

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

1323 // handle this if there hasn't already been something that
1324 // redirects fetch in this group of instructions.
1325
1326 // This probably needs to prioritize the redirects if a different
1327 // scheduler is used. Currently the scheduler schedules the oldest
1328 // instruction first, so the branch resolution order will be correct.
1329 unsigned tid = inst->threadNumber;
1330
1331 if (!fetchRedirect[tid]) {
1332
1333 if (inst->mispredicted()) {
1334 fetchRedirect[tid] = true;
1335
1336 DPRINTF(IEW, "Execute: Branch mispredict detected.\n");
1337#if ISA_HAS_DELAY_SLOT
1338 DPRINTF(IEW, "Execute: Redirecting fetch to PC: %#x.\n",
1339 inst->nextNPC);

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

1345 squashDueToBranch(inst, tid);
1346
1347 if (inst->predTaken()) {
1348 predictedTakenIncorrect++;
1349 } else {
1350 predictedNotTakenIncorrect++;
1351 }
1352 } else if (ldstQueue.violation(tid)) {
1353 fetchRedirect[tid] = true;
1354
1355 // If there was an ordering violation, then get the
1356 // DynInst that caused the violation. Note that this
1357 // clears the violation signal.
1358 DynInstPtr violator;
1359 violator = ldstQueue.getMemDepViolator(tid);
1360
1361 DPRINTF(IEW, "LDSTQ detected a violation. Violator PC: "
1362 "%#x, inst PC: %#x. Addr is: %#x.\n",
1363 violator->readPC(), inst->readPC(), inst->physEffAddr);
1364
1365 // Tell the instruction queue that a violation has occured.
1366 instQueue.violation(inst, violator);
1367
1368 // Squash.
1369 squashDueToMemOrder(inst,tid);
1370
1371 ++memOrderViolationEvents;
1372 } else if (ldstQueue.loadBlocked(tid) &&

--- 231 unchanged lines hidden ---