Deleted Added
sdiff udiff text old ( 13454:19a5b4fb1f1f ) new ( 13455:56e25a5f9603 )
full compact
1/*
2 * Copyright (c) 2014 The University of Wisconsin
3 *
4 * Copyright (c) 2006 INRIA (Institut National de Recherche en
5 * Informatique et en Automatique / French National Research Institute
6 * for Computer Science and Applied Mathematics)
7 *
8 * All rights reserved.

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

343 bi->longestMatchPred =
344 gtable[bi->hitBank][tableIndices[bi->hitBank]].ctr >= 0;
345 bi->pseudoNewAlloc =
346 abs(2 * gtable[bi->hitBank][bi->hitBankIndex].ctr + 1) <= 1;
347
348 //if the entry is recognized as a newly allocated entry and
349 //useAltPredForNewlyAllocated is positive use the alternate
350 //prediction
351 if ((useAltPredForNewlyAllocated < 0)
352 || abs(2 *
353 gtable[bi->hitBank][tableIndices[bi->hitBank]].ctr + 1) > 1)
354 bi->tagePred = bi->longestMatchPred;
355 else
356 bi->tagePred = bi->altTaken;
357 } else {
358 bi->altTaken = getBimodePred(pc, bi);
359 bi->tagePred = bi->altTaken;
360 bi->longestMatchPred = bi->altTaken;
361 }
362 //end TAGE prediction
363
364 pred_taken = (bi->tagePred);
365 DPRINTF(Tage, "Predict for %lx: taken?:%d, tagePred:%d, altPred:%d\n",
366 branch_pc, pred_taken, bi->tagePred, bi->altTaken);
367 }
368 bi->branchPC = branch_pc;

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

385 squash(tid, taken, bp_history);
386 return;
387 }
388
389 int nrand = random_mt.random<int>(0,3);
390 if (bi->condBranch) {
391 DPRINTF(Tage, "Updating tables for branch:%lx; taken?:%d\n",
392 branch_pc, taken);
393 condBranchUpdate(branch_pc, taken, bi, nrand);
394 }
395 if (!squashed) {
396 delete bi;
397 }
398}
399
400void

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

597{
598 DPRINTF(Tage, "UnConditionalBranch: %lx\n", br_pc);
599 predict(tid, br_pc, false, bp_history);
600 updateHistories(tid, br_pc, true, bp_history);
601 assert(threadHistory[tid].gHist ==
602 &threadHistory[tid].globalHistory[threadHistory[tid].ptGhist]);
603}
604
605TAGE*
606TAGEParams::create()
607{
608 return new TAGE(this);
609}