Hand-merge static_inst.hh. These execute functions are within an external file in...
[gem5.git] / cpu / ooo_cpu / ea_list.cc
1
2 #include "arch/alpha/isa_traits.hh"
3 #include "cpu/inst_seq.hh"
4 #include "cpu/ooo_cpu/ea_list.hh"
5
6 void
7 EAList::addAddr(const InstSeqNum &new_sn, const Addr &new_ea)
8 {
9 instEA newEA(new_sn, new_ea);
10
11 eaList.push_back(newEA);
12 }
13
14 void
15 EAList::clearAddr(const InstSeqNum &sn_to_clear, const Addr &ea_to_clear)
16 {
17 eaListIt list_it = eaList.begin();
18
19 while (list_it != eaList.end() && (*list_it).first != sn_to_clear) {
20 assert((*list_it).second == ea_to_clear);
21 }
22 }
23
24 bool
25 EAList::checkConflict(const InstSeqNum &check_sn, const Addr &check_ea) const
26 {
27 const constEAListIt list_it = eaList.begin();
28
29 while (list_it != eaList.end() && (*list_it).first < check_sn) {
30 if ((*list_it).second == check_ea) {
31 return true;
32 }
33 }
34
35 return false;
36 }
37
38 void
39 EAList::clear()
40 {
41 eaList.clear();
42 }
43
44 void
45 EAList::commit(const InstSeqNum &commit_sn)
46 {
47 while (!eaList.empty() && eaList.front().first <= commit_sn) {
48 eaList.pop_front();
49 }
50 }