Пример #1
0
  void makeUpdate(BOOL takenActually, BOOL takenPredicted, ADDRINT address) {
    bool p1Accurate = (predictor1.makePrediction(address) == takenActually);
    bool p2Accurate = (predictor2.makePrediction(address) == takenActually);

    predictor1.makeUpdate(takenActually, takenPredicted, address);
    predictor2.makeUpdate(takenActually, takenPredicted, address);

    bool selectorPrediction = selector.makePrediction(address);
    if (p1Accurate != p2Accurate) {
      selector.makeUpdate(p1Accurate, selectorPrediction, address);
    }
    selector.historyUpdate(takenActually, selectorPrediction, address);
  }
Пример #2
0
 BOOL makePrediction(ADDRINT address) {
   return (selector.makePrediction(address)) ?
       predictor1.makePrediction(address) : predictor2.makePrediction(address);
 }