Deleted Added
sdiff udiff text old ( 13455:56e25a5f9603 ) new ( 13626:d6a6358aa6db )
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.

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

50
51#ifndef __CPU_PRED_TAGE
52#define __CPU_PRED_TAGE
53
54#include <vector>
55
56#include "base/types.hh"
57#include "cpu/pred/bpred_unit.hh"
58#include "cpu/pred/tage_base.hh"
59#include "params/TAGE.hh"
60
61class TAGE: public BPredUnit
62{
63 protected:
64 TAGEBase *tage;
65
66 struct TageBranchInfo {
67 TAGEBase::BranchInfo *tageBranchInfo;
68
69 TageBranchInfo(TAGEBase &tage) : tageBranchInfo(tage.makeBranchInfo())
70 {}
71
72 virtual ~TageBranchInfo()
73 {
74 delete tageBranchInfo;
75 }
76 };
77
78 virtual bool predict(ThreadID tid, Addr branch_pc, bool cond_branch,
79 void* &b);
80 public:
81
82 TAGE(const TAGEParams *params);
83
84 // Base class methods.
85 void uncondBranch(ThreadID tid, Addr br_pc, void* &bp_history) override;
86 bool lookup(ThreadID tid, Addr branch_addr, void* &bp_history) override;
87 void btbUpdate(ThreadID tid, Addr branch_addr, void* &bp_history) override;
88 void update(ThreadID tid, Addr branch_addr, bool taken, void *bp_history,
89 bool squashed, const StaticInstPtr & inst,
90 Addr corrTarget) override;
91 virtual void squash(ThreadID tid, void *bp_history) override;
92 unsigned getGHR(ThreadID tid, void *bp_history) const override;
93};
94
95#endif // __CPU_PRED_TAGE