39d38
< unsigned _globalCtrBits,
40a40
> unsigned _globalCtrBits,
250c250
< choiceCtrs[globalHistory].decrement();
---
> choiceCtrs[history->globalHistory].decrement();
252c252
< choiceCtrs[globalHistory].increment();
---
> choiceCtrs[history->globalHistory].increment();
253a254
>
255a257,290
> // Update the counters and local history with the proper
> // resolution of the branch. Global history is updated
> // speculatively and restored upon squash() calls, so it does not
> // need to be updated.
> if (taken) {
> localCtrs[local_predictor_idx].increment();
> globalCtrs[history->globalHistory].increment();
>
> updateLocalHistTaken(local_history_idx);
> } else {
> localCtrs[local_predictor_idx].decrement();
> globalCtrs[history->globalHistory].decrement();
>
> updateLocalHistNotTaken(local_history_idx);
> }
>
> bool mispredict = false;
>
> //global predictor used and mispredicted
> if (history->globalUsed && history->globalPredTaken != taken)
> mispredict = true;
> //local predictor used and mispredicted
> else if (!history->globalUsed && history->localPredTaken != taken)
> mispredict = true;
>
> if (mispredict) {
> if (taken) {
> globalHistory = globalHistory | 1;
> } else {
> unsigned mask = globalHistoryMask - 1;
> globalHistory = globalHistory & mask;
> }
>
> }
264,270d298
< // Update the counters and local history with the proper
< // resolution of the branch. Global history is updated
< // speculatively and restored upon squash() calls, so it does not
< // need to be updated.
< if (taken) {
< localCtrs[local_predictor_idx].increment();
< globalCtrs[globalHistory].increment();
272,278d299
< updateLocalHistTaken(local_history_idx);
< } else {
< localCtrs[local_predictor_idx].decrement();
< globalCtrs[globalHistory].decrement();
<
< updateLocalHistNotTaken(local_history_idx);
< }