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; --- 199 unchanged lines hidden (view full) --- 208 // renaming. We find the architectural register index by indexing 209 // into the instruction's own operand index table. Note that a 210 // raw pointer to the StaticInst is provided instead of a 211 // ref-counted StaticInstPtr to redice overhead. This is fine as 212 // long as these methods don't copy the pointer into any long-term 213 // storage (which is pretty hard to imagine they would have reason 214 // to do). 215 |
216 uint64_t readIntRegOperand(const StaticInst *si, int idx) |
217 { 218 return thread->readIntReg(si->srcRegIdx(idx)); 219 } 220 |
221 FloatReg readFloatRegOperand(const StaticInst *si, int idx, int width) |
222 { 223 int reg_idx = si->srcRegIdx(idx) - TheISA::FP_Base_DepTag; 224 return thread->readFloatReg(reg_idx, width); 225 } 226 |
227 FloatReg readFloatRegOperand(const StaticInst *si, int idx) |
228 { 229 int reg_idx = si->srcRegIdx(idx) - TheISA::FP_Base_DepTag; 230 return thread->readFloatReg(reg_idx); 231 } 232 |
233 FloatRegBits readFloatRegOperandBits(const StaticInst *si, int idx, 234 int width) |
235 { 236 int reg_idx = si->srcRegIdx(idx) - TheISA::FP_Base_DepTag; 237 return thread->readFloatRegBits(reg_idx, width); 238 } 239 |
240 FloatRegBits readFloatRegOperandBits(const StaticInst *si, int idx) |
241 { 242 int reg_idx = si->srcRegIdx(idx) - TheISA::FP_Base_DepTag; 243 return thread->readFloatRegBits(reg_idx); 244 } 245 |
246 void setIntRegOperand(const StaticInst *si, int idx, uint64_t val) |
247 { 248 thread->setIntReg(si->destRegIdx(idx), val); 249 } 250 |
251 void setFloatRegOperand(const StaticInst *si, int idx, FloatReg val, 252 int width) |
253 { 254 int reg_idx = si->destRegIdx(idx) - TheISA::FP_Base_DepTag; 255 thread->setFloatReg(reg_idx, val, width); 256 } 257 |
258 void setFloatRegOperand(const StaticInst *si, int idx, FloatReg val) |
259 { 260 int reg_idx = si->destRegIdx(idx) - TheISA::FP_Base_DepTag; 261 thread->setFloatReg(reg_idx, val); 262 } 263 |
264 void setFloatRegOperandBits(const StaticInst *si, int idx, 265 FloatRegBits val, int width) |
266 { 267 int reg_idx = si->destRegIdx(idx) - TheISA::FP_Base_DepTag; 268 thread->setFloatRegBits(reg_idx, val, width); 269 } 270 |
271 void setFloatRegOperandBits(const StaticInst *si, int idx, 272 FloatRegBits val) |
273 { 274 int reg_idx = si->destRegIdx(idx) - TheISA::FP_Base_DepTag; 275 thread->setFloatRegBits(reg_idx, val); 276 } 277 278 uint64_t readPC() { return thread->readPC(); } 279 uint64_t readNextPC() { return thread->readNextPC(); } 280 uint64_t readNextNPC() { return thread->readNextNPC(); } --- 38 unchanged lines hidden --- |