2c2
< * Copyright (c) 2012-2013 ARM Limited
---
> * Copyright (c) 2012-2013, 2015 ARM Limited
50a51
> #include "base/hashmap.hh"
57,58d57
< static const int maxContexts = 64;
<
84c83,91
< StrideEntry **pcTable[maxContexts];
---
> class PCTable
> {
> public:
> PCTable(int assoc, int sets, const std::string name) :
> pcTableAssoc(assoc), pcTableSets(sets), _name(name) {}
> StrideEntry** operator[] (int context) {
> auto it = entries.find(context);
> if (it != entries.end())
> return it->second;
85a93,107
> return allocateNewContext(context);
> }
>
> ~PCTable();
> private:
> const std::string name() {return _name; }
> const int pcTableAssoc;
> const int pcTableSets;
> const std::string _name;
> m5::hash_map<int, StrideEntry**> entries;
>
> StrideEntry** allocateNewContext(int context);
> };
> PCTable pcTable;
>
93d114
< ~StridePrefetcher();