Deleted Added
sdiff udiff text old ( 11877:5ea85692a53e ) new ( 12104:edd63f9c6184 )
full compact
1/*
2 * Copyright (c) 2011 ARM Limited
3 * Copyright (c) 2013 Advanced Micro Devices, Inc.
4 * All rights reserved
5 *
6 * The license below extends only to copyright in the software and shall
7 * not be construed as granting a license to any other intellectual
8 * property including but not limited to intellectual property relating

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

208 // raw pointer to the StaticInst is provided instead of a
209 // ref-counted StaticInstPtr to redice overhead. This is fine as
210 // long as these methods don't copy the pointer into any long-term
211 // storage (which is pretty hard to imagine they would have reason
212 // to do).
213
214 IntReg readIntRegOperand(const StaticInst *si, int idx) override
215 {
216 return thread->readIntReg(si->srcRegIdx(idx));
217 }
218
219 FloatReg readFloatRegOperand(const StaticInst *si, int idx) override
220 {
221 int reg_idx = si->srcRegIdx(idx) - TheISA::FP_Reg_Base;
222 return thread->readFloatReg(reg_idx);
223 }
224
225 FloatRegBits readFloatRegOperandBits(const StaticInst *si,
226 int idx) override
227 {
228 int reg_idx = si->srcRegIdx(idx) - TheISA::FP_Reg_Base;
229 return thread->readFloatRegBits(reg_idx);
230 }
231
232 CCReg readCCRegOperand(const StaticInst *si, int idx) override
233 {
234 int reg_idx = si->srcRegIdx(idx) - TheISA::CC_Reg_Base;
235 return thread->readCCReg(reg_idx);
236 }
237
238 template <class T>
239 void setResult(T t)
240 {
241 Result instRes;
242 instRes.set(t);
243 result.push(instRes);
244 }
245
246 void setIntRegOperand(const StaticInst *si, int idx,
247 IntReg val) override
248 {
249 thread->setIntReg(si->destRegIdx(idx), val);
250 setResult<uint64_t>(val);
251 }
252
253 void setFloatRegOperand(const StaticInst *si, int idx,
254 FloatReg val) override
255 {
256 int reg_idx = si->destRegIdx(idx) - TheISA::FP_Reg_Base;
257 thread->setFloatReg(reg_idx, val);
258 setResult<double>(val);
259 }
260
261 void setFloatRegOperandBits(const StaticInst *si, int idx,
262 FloatRegBits val) override
263 {
264 int reg_idx = si->destRegIdx(idx) - TheISA::FP_Reg_Base;
265 thread->setFloatRegBits(reg_idx, val);
266 setResult<uint64_t>(val);
267 }
268
269 void setCCRegOperand(const StaticInst *si, int idx, CCReg val) override
270 {
271 int reg_idx = si->destRegIdx(idx) - TheISA::CC_Reg_Base;
272 thread->setCCReg(reg_idx, val);
273 setResult<uint64_t>(val);
274 }
275
276 bool readPredicate() override { return thread->readPredicate(); }
277 void setPredicate(bool val) override
278 {
279 thread->setPredicate(val);
280 }

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

312 {
313 DPRINTF(Checker, "Setting misc reg %d with effect to check later\n", misc_reg);
314 miscRegIdxs.push(misc_reg);
315 return thread->setMiscReg(misc_reg, val);
316 }
317
318 MiscReg readMiscRegOperand(const StaticInst *si, int idx) override
319 {
320 int reg_idx = si->srcRegIdx(idx) - TheISA::Misc_Reg_Base;
321 return thread->readMiscReg(reg_idx);
322 }
323
324 void setMiscRegOperand(const StaticInst *si, int idx,
325 const MiscReg &val) override
326 {
327 int reg_idx = si->destRegIdx(idx) - TheISA::Misc_Reg_Base;
328 return this->setMiscReg(reg_idx, val);
329 }
330
331#if THE_ISA == MIPS_ISA
332 MiscReg readRegOtherThread(int misc_reg, ThreadID tid) override
333 {
334 panic("MIPS MT not defined for CheckerCPU.\n");
335 return 0;
336 }
337
338 void setRegOtherThread(int misc_reg, MiscReg val, ThreadID tid) override
339 {
340 panic("MIPS MT not defined for CheckerCPU.\n");
341 }
342#endif
343
344 /////////////////////////////////////////
345
346 void recordPCChange(const TheISA::PCState &val)

--- 132 unchanged lines hidden ---