52a53
> logRatioBiModalHystEntries(params->logRatioBiModalHystEntries),
125c126,130
< btable = new BimodalEntry[ULL(1) << logSizeBiMP];
---
> const uint64_t bimodalTableSize = ULL(1) << logSizeBiMP;
> btablePrediction.resize(bimodalTableSize, false);
> btableHysteresis.resize(bimodalTableSize >> logRatioBiModalHystEntries,
> true);
>
214c219
< return (btable[bi->bimodalIndex].pred > 0);
---
> return btablePrediction[bi->bimodalIndex];
218,219c223,224
< // Update the bimodal predictor: a hysteresis bit is shared among 4 prediction
< // bits
---
> // Update the bimodal predictor: a hysteresis bit is shared among N prediction
> // bits (N = 2 ^ logRatioBiModalHystEntries)
223,224c228,229
< int inter = (btable[bi->bimodalIndex].pred << 1)
< + btable[bi->bimodalIndex ].hyst;
---
> int inter = (btablePrediction[bi->bimodalIndex] << 1)
> + btableHysteresis[bi->bimodalIndex >> logRatioBiModalHystEntries];
231,234c236,240
< btable[bi->bimodalIndex].pred = inter >> 1;
< btable[bi->bimodalIndex].hyst = (inter & 1);
< DPRINTF(LTage, "Updating branch %lx, pred:%d, hyst:%d\n",
< pc, btable[bi->bimodalIndex].pred,btable[bi->bimodalIndex].hyst);
---
> const bool pred = inter >> 1;
> const bool hyst = inter & 1;
> btablePrediction[bi->bimodalIndex] = pred;
> btableHysteresis[bi->bimodalIndex >> logRatioBiModalHystEntries] = hyst;
> DPRINTF(LTage, "Updating branch %lx, pred:%d, hyst:%d\n", pc, pred, hyst);