Deleted Added
sdiff udiff text old ( 8232:b28d06a175be ) new ( 8519:ef35ce2bd73f )
full compact
1/*
2 * Copyright (c) 2004-2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

29 */
30
31#include "base/intmath.hh"
32#include "base/misc.hh"
33#include "base/trace.hh"
34#include "cpu/o3/store_set.hh"
35#include "debug/StoreSet.hh"
36
37StoreSet::StoreSet(int _SSIT_size, int _LFST_size)
38 : SSITSize(_SSIT_size), LFSTSize(_LFST_size)
39{
40 DPRINTF(StoreSet, "StoreSet: Creating store set object.\n");
41 DPRINTF(StoreSet, "StoreSet: SSIT size: %i, LFST size: %i.\n",
42 SSITSize, LFSTSize);
43
44 if (!isPowerOf2(SSITSize)) {
45 fatal("Invalid SSIT size!\n");
46 }

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

63 for (int i = 0; i < LFSTSize; ++i) {
64 validLFST[i] = false;
65 LFST[i] = 0;
66 }
67
68 indexMask = SSITSize - 1;
69
70 offsetBits = 2;
71}
72
73StoreSet::~StoreSet()
74{
75}
76
77void
78StoreSet::init(int _SSIT_size, int _LFST_size)
79{
80 SSITSize = _SSIT_size;
81 LFSTSize = _LFST_size;
82
83 DPRINTF(StoreSet, "StoreSet: Creating store set object.\n");
84 DPRINTF(StoreSet, "StoreSet: SSIT size: %i, LFST size: %i.\n",
85 SSITSize, LFSTSize);
86
87 SSIT.resize(SSITSize);
88
89 validSSIT.resize(SSITSize);

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

98 for (int i = 0; i < LFSTSize; ++i) {
99 validLFST[i] = false;
100 LFST[i] = 0;
101 }
102
103 indexMask = SSITSize - 1;
104
105 offsetBits = 2;
106}
107
108
109void
110StoreSet::violation(Addr store_PC, Addr load_PC)
111{
112 int load_index = calcIndex(load_PC);
113 int store_index = calcIndex(store_PC);

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

175 DPRINTF(StoreSet, "StoreSet: Store had smaller store set: %i; "
176 "for load %#x, store %#x\n",
177 store_SSID, load_PC, store_PC);
178 }
179 }
180}
181
182void
183StoreSet::insertLoad(Addr load_PC, InstSeqNum load_seq_num)
184{
185 // Does nothing.
186 return;
187}
188
189void
190StoreSet::insertStore(Addr store_PC, InstSeqNum store_seq_num, ThreadID tid)
191{
192 int index = calcIndex(store_PC);
193
194 int store_SSID;
195
196 assert(index < SSITSize);
197
198 if (!validSSIT[index]) {
199 // Do nothing if there's no valid entry.
200 return;
201 } else {
202 store_SSID = SSIT[index];
203

--- 145 unchanged lines hidden ---