Deleted Added
sdiff udiff text old ( 5714:76abee886def ) new ( 5715:e8c1d4e669a7 )
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;

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

77
78 /** Reads this CPU's ID. */
79 virtual int cpuId() { return cpu->cpuId(); }
80
81 virtual int contextId() { return thread->contextId(); }
82
83 virtual void setContextId(int id) { thread->setContextId(id); }
84
85#if FULL_SYSTEM
86 /** Returns a pointer to the system. */
87 virtual System *getSystemPtr() { return cpu->system; }
88
89 /** Returns a pointer to physical memory. */
90 virtual PhysicalMemory *getPhysMemPtr() { return cpu->physmem; }
91
92 /** Returns a pointer to this thread's kernel statistics. */

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

147 /** Reads the last tick that this thread was suspended on. */
148 virtual Tick readLastSuspend();
149
150 /** Clears the function profiling information. */
151 virtual void profileClear();
152 /** Samples the function profiling information. */
153 virtual void profileSample();
154#endif
155 /** Returns this thread's ID number. */
156 virtual int getThreadNum() { return thread->readTid(); }
157
158 /** Returns the instruction this thread is currently committing.
159 * Only used when an instruction faults.
160 */
161 virtual TheISA::MachInst getInst();
162
163 /** Copies the architectural registers from another TC into this TC. */
164 virtual void copyArchRegs(ThreadContext *tc);
165

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

185 virtual void setFloatReg(int reg_idx, FloatReg val);
186
187 virtual void setFloatRegBits(int reg_idx, FloatRegBits val, int width);
188
189 virtual void setFloatRegBits(int reg_idx, FloatRegBits val);
190
191 /** Reads this thread's PC. */
192 virtual uint64_t readPC()
193 { return cpu->readPC(thread->readTid()); }
194
195 /** Sets this thread's PC. */
196 virtual void setPC(uint64_t val);
197
198 /** Reads this thread's next PC. */
199 virtual uint64_t readNextPC()
200 { return cpu->readNextPC(thread->readTid()); }
201
202 /** Sets this thread's next PC. */
203 virtual void setNextPC(uint64_t val);
204
205 virtual uint64_t readMicroPC()
206 { return cpu->readMicroPC(thread->readTid()); }
207
208 virtual void setMicroPC(uint64_t val);
209
210 virtual uint64_t readNextMicroPC()
211 { return cpu->readNextMicroPC(thread->readTid()); }
212
213 virtual void setNextMicroPC(uint64_t val);
214
215 /** Reads a miscellaneous register. */
216 virtual MiscReg readMiscRegNoEffect(int misc_reg)
217 { return cpu->readMiscRegNoEffect(misc_reg, thread->readTid()); }
218
219 /** Reads a misc. register, including any side-effects the
220 * read might have as defined by the architecture. */
221 virtual MiscReg readMiscReg(int misc_reg)
222 { return cpu->readMiscReg(misc_reg, thread->readTid()); }
223
224 /** Sets a misc. register. */
225 virtual void setMiscRegNoEffect(int misc_reg, const MiscReg &val);
226
227 /** Sets a misc. register, including any side-effects the
228 * write might have as defined by the architecture. */
229 virtual void setMiscReg(int misc_reg, const MiscReg &val);
230

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

252 /** Sets a syscall argument. */
253 virtual void setSyscallArg(int i, IntReg val);
254
255 /** Sets the syscall return value. */
256 virtual void setSyscallReturn(SyscallReturn return_value);
257
258 /** Executes a syscall in SE mode. */
259 virtual void syscall(int64_t callnum)
260 { return cpu->syscall(callnum, thread->readTid()); }
261
262 /** Reads the funcExeInst counter. */
263 virtual Counter readFuncExeInst() { return thread->funcExeInst; }
264#else
265 /** Returns pointer to the quiesce event. */
266 virtual EndQuiesceEvent *getQuiesceEvent()
267 {
268 return this->thread->quiesceEvent;
269 }
270#endif
271
272 virtual uint64_t readNextNPC()
273 {
274 return this->cpu->readNextNPC(this->thread->readTid());
275 }
276
277 virtual void setNextNPC(uint64_t val)
278 {
279#if THE_ISA == ALPHA_ISA
280 panic("Not supported on Alpha!");
281#endif
282 this->cpu->setNextNPC(val, this->thread->readTid());
283 }
284
285 /** This function exits the thread context in the CPU and returns
286 * 1 if the CPU has no more active threads (meaning it's OK to exit);
287 * Used in syscall-emulation mode when a thread executes the 'exit'
288 * syscall.
289 */
290 virtual int exit()

--- 12 unchanged lines hidden ---