base.hh (6221:58a3c04e6344) base.hh (6314:781969fbeca9)
1/*
2 * Copyright (c) 2002-2005 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;

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

257 // storage (which is pretty hard to imagine they would have reason
258 // to do).
259
260 uint64_t readIntRegOperand(const StaticInst *si, int idx)
261 {
262 return thread->readIntReg(si->srcRegIdx(idx));
263 }
264
1/*
2 * Copyright (c) 2002-2005 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;

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

257 // storage (which is pretty hard to imagine they would have reason
258 // to do).
259
260 uint64_t readIntRegOperand(const StaticInst *si, int idx)
261 {
262 return thread->readIntReg(si->srcRegIdx(idx));
263 }
264
265 FloatReg readFloatRegOperand(const StaticInst *si, int idx, int width)
266 {
267 int reg_idx = si->srcRegIdx(idx) - TheISA::FP_Base_DepTag;
268 return thread->readFloatReg(reg_idx, width);
269 }
270
271 FloatReg readFloatRegOperand(const StaticInst *si, int idx)
272 {
273 int reg_idx = si->srcRegIdx(idx) - TheISA::FP_Base_DepTag;
274 return thread->readFloatReg(reg_idx);
275 }
276
265 FloatReg readFloatRegOperand(const StaticInst *si, int idx)
266 {
267 int reg_idx = si->srcRegIdx(idx) - TheISA::FP_Base_DepTag;
268 return thread->readFloatReg(reg_idx);
269 }
270
277 FloatRegBits readFloatRegOperandBits(const StaticInst *si, int idx,
278 int width)
279 {
280 int reg_idx = si->srcRegIdx(idx) - TheISA::FP_Base_DepTag;
281 return thread->readFloatRegBits(reg_idx, width);
282 }
283
284 FloatRegBits readFloatRegOperandBits(const StaticInst *si, int idx)
285 {
286 int reg_idx = si->srcRegIdx(idx) - TheISA::FP_Base_DepTag;
287 return thread->readFloatRegBits(reg_idx);
288 }
289
290 void setIntRegOperand(const StaticInst *si, int idx, uint64_t val)
291 {
292 thread->setIntReg(si->destRegIdx(idx), val);
293 }
294
271 FloatRegBits readFloatRegOperandBits(const StaticInst *si, int idx)
272 {
273 int reg_idx = si->srcRegIdx(idx) - TheISA::FP_Base_DepTag;
274 return thread->readFloatRegBits(reg_idx);
275 }
276
277 void setIntRegOperand(const StaticInst *si, int idx, uint64_t val)
278 {
279 thread->setIntReg(si->destRegIdx(idx), val);
280 }
281
295 void setFloatRegOperand(const StaticInst *si, int idx, FloatReg val,
296 int width)
297 {
298 int reg_idx = si->destRegIdx(idx) - TheISA::FP_Base_DepTag;
299 thread->setFloatReg(reg_idx, val, width);
300 }
301
302 void setFloatRegOperand(const StaticInst *si, int idx, FloatReg val)
303 {
304 int reg_idx = si->destRegIdx(idx) - TheISA::FP_Base_DepTag;
305 thread->setFloatReg(reg_idx, val);
306 }
307
308 void setFloatRegOperandBits(const StaticInst *si, int idx,
282 void setFloatRegOperand(const StaticInst *si, int idx, FloatReg val)
283 {
284 int reg_idx = si->destRegIdx(idx) - TheISA::FP_Base_DepTag;
285 thread->setFloatReg(reg_idx, val);
286 }
287
288 void setFloatRegOperandBits(const StaticInst *si, int idx,
309 FloatRegBits val, int width)
310 {
311 int reg_idx = si->destRegIdx(idx) - TheISA::FP_Base_DepTag;
312 thread->setFloatRegBits(reg_idx, val, width);
313 }
314
315 void setFloatRegOperandBits(const StaticInst *si, int idx,
316 FloatRegBits val)
317 {
318 int reg_idx = si->destRegIdx(idx) - TheISA::FP_Base_DepTag;
319 thread->setFloatRegBits(reg_idx, val);
320 }
321
322 uint64_t readPC() { return thread->readPC(); }
323 uint64_t readMicroPC() { return thread->readMicroPC(); }

--- 106 unchanged lines hidden ---
289 FloatRegBits val)
290 {
291 int reg_idx = si->destRegIdx(idx) - TheISA::FP_Base_DepTag;
292 thread->setFloatRegBits(reg_idx, val);
293 }
294
295 uint64_t readPC() { return thread->readPC(); }
296 uint64_t readMicroPC() { return thread->readMicroPC(); }

--- 106 unchanged lines hidden ---