base_dyn_inst_impl.hh (5375:2bd02f12dc05) base_dyn_inst_impl.hh (5737:f43dbc09fad3)
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;

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

163 threadNumber = 0;
164
165 // Also make this a parameter, or perhaps get it from xc or cpu.
166 asid = 0;
167
168 // Initialize the fault to be NoFault.
169 fault = NoFault;
170
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;

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

163 threadNumber = 0;
164
165 // Also make this a parameter, or perhaps get it from xc or cpu.
166 asid = 0;
167
168 // Initialize the fault to be NoFault.
169 fault = NoFault;
170
171 ++instcount;
171#ifndef NDEBUG
172 ++cpu->instcount;
172
173
173 if (instcount > 1500) {
174 if (cpu->instcount > 1500) {
174#ifdef DEBUG
175 cpu->dumpInsts();
176 dumpSNList();
177#endif
175#ifdef DEBUG
176 cpu->dumpInsts();
177 dumpSNList();
178#endif
178 assert(instcount <= 1500);
179 assert(cpu->instcount <= 1500);
179 }
180
180 }
181
181 DPRINTF(DynInst, "DynInst: [sn:%lli] Instruction created. Instcount=%i\n",
182 seqNum, instcount);
182 DPRINTF(DynInst,
183 "DynInst: [sn:%lli] Instruction created. Instcount for %s = %i\n",
184 seqNum, cpu->name(), cpu->instcount);
185#endif
183
184#ifdef DEBUG
185 cpu->snList.insert(seqNum);
186#endif
187}
188
189template <class Impl>
190BaseDynInst<Impl>::~BaseDynInst()
191{
192 if (memData) {
193 delete [] memData;
194 }
195
196 if (traceData) {
197 delete traceData;
198 }
199
200 fault = NoFault;
201
186
187#ifdef DEBUG
188 cpu->snList.insert(seqNum);
189#endif
190}
191
192template <class Impl>
193BaseDynInst<Impl>::~BaseDynInst()
194{
195 if (memData) {
196 delete [] memData;
197 }
198
199 if (traceData) {
200 delete traceData;
201 }
202
203 fault = NoFault;
204
202 --instcount;
205#ifndef NDEBUG
206 --cpu->instcount;
203
207
204 DPRINTF(DynInst, "DynInst: [sn:%lli] Instruction destroyed. Instcount=%i\n",
205 seqNum, instcount);
208 DPRINTF(DynInst,
209 "DynInst: [sn:%lli] Instruction destroyed. Instcount for %s = %i\n",
210 seqNum, cpu->name(), cpu->instcount);
211#endif
206#ifdef DEBUG
207 cpu->snList.erase(seqNum);
208#endif
209}
210
211#ifdef DEBUG
212template <class Impl>
213void

--- 133 unchanged lines hidden ---
212#ifdef DEBUG
213 cpu->snList.erase(seqNum);
214#endif
215}
216
217#ifdef DEBUG
218template <class Impl>
219void

--- 133 unchanged lines hidden ---