cpu.hh (6022:410194bb3049) | cpu.hh (6314:781969fbeca9) |
---|---|
1/* 2 * Copyright (c) 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; --- 197 unchanged lines hidden (view full) --- 206 // storage (which is pretty hard to imagine they would have reason 207 // to do). 208 209 uint64_t readIntRegOperand(const StaticInst *si, int idx) 210 { 211 return thread->readIntReg(si->srcRegIdx(idx)); 212 } 213 | 1/* 2 * Copyright (c) 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; --- 197 unchanged lines hidden (view full) --- 206 // storage (which is pretty hard to imagine they would have reason 207 // to do). 208 209 uint64_t readIntRegOperand(const StaticInst *si, int idx) 210 { 211 return thread->readIntReg(si->srcRegIdx(idx)); 212 } 213 |
214 FloatReg readFloatRegOperand(const StaticInst *si, int idx, int width) 215 { 216 int reg_idx = si->srcRegIdx(idx) - TheISA::FP_Base_DepTag; 217 return thread->readFloatReg(reg_idx, width); 218 } 219 | |
220 FloatReg readFloatRegOperand(const StaticInst *si, int idx) 221 { 222 int reg_idx = si->srcRegIdx(idx) - TheISA::FP_Base_DepTag; 223 return thread->readFloatReg(reg_idx); 224 } 225 | 214 FloatReg readFloatRegOperand(const StaticInst *si, int idx) 215 { 216 int reg_idx = si->srcRegIdx(idx) - TheISA::FP_Base_DepTag; 217 return thread->readFloatReg(reg_idx); 218 } 219 |
226 FloatRegBits readFloatRegOperandBits(const StaticInst *si, int idx, 227 int width) 228 { 229 int reg_idx = si->srcRegIdx(idx) - TheISA::FP_Base_DepTag; 230 return thread->readFloatRegBits(reg_idx, width); 231 } 232 | |
233 FloatRegBits readFloatRegOperandBits(const StaticInst *si, int idx) 234 { 235 int reg_idx = si->srcRegIdx(idx) - TheISA::FP_Base_DepTag; 236 return thread->readFloatRegBits(reg_idx); 237 } 238 239 void setIntRegOperand(const StaticInst *si, int idx, uint64_t val) 240 { 241 thread->setIntReg(si->destRegIdx(idx), val); 242 result.integer = val; 243 } 244 | 220 FloatRegBits readFloatRegOperandBits(const StaticInst *si, int idx) 221 { 222 int reg_idx = si->srcRegIdx(idx) - TheISA::FP_Base_DepTag; 223 return thread->readFloatRegBits(reg_idx); 224 } 225 226 void setIntRegOperand(const StaticInst *si, int idx, uint64_t val) 227 { 228 thread->setIntReg(si->destRegIdx(idx), val); 229 result.integer = val; 230 } 231 |
245 void setFloatRegOperand(const StaticInst *si, int idx, FloatReg val, 246 int width) 247 { 248 int reg_idx = si->destRegIdx(idx) - TheISA::FP_Base_DepTag; 249 thread->setFloatReg(reg_idx, val, width); 250 switch(width) { 251 case 32: 252 result.dbl = (double)val; 253 break; 254 case 64: 255 result.dbl = val; 256 break; 257 }; 258 } 259 | |
260 void setFloatRegOperand(const StaticInst *si, int idx, FloatReg val) 261 { 262 int reg_idx = si->destRegIdx(idx) - TheISA::FP_Base_DepTag; 263 thread->setFloatReg(reg_idx, val); 264 result.dbl = (double)val; 265 } 266 267 void setFloatRegOperandBits(const StaticInst *si, int idx, | 232 void setFloatRegOperand(const StaticInst *si, int idx, FloatReg val) 233 { 234 int reg_idx = si->destRegIdx(idx) - TheISA::FP_Base_DepTag; 235 thread->setFloatReg(reg_idx, val); 236 result.dbl = (double)val; 237 } 238 239 void setFloatRegOperandBits(const StaticInst *si, int idx, |
268 FloatRegBits val, int width) 269 { 270 int reg_idx = si->destRegIdx(idx) - TheISA::FP_Base_DepTag; 271 thread->setFloatRegBits(reg_idx, val, width); 272 result.integer = val; 273 } 274 275 void setFloatRegOperandBits(const StaticInst *si, int idx, | |
276 FloatRegBits val) 277 { 278 int reg_idx = si->destRegIdx(idx) - TheISA::FP_Base_DepTag; 279 thread->setFloatRegBits(reg_idx, val); 280 result.integer = val; 281 } 282 283 uint64_t readPC() { return thread->readPC(); } --- 134 unchanged lines hidden --- | 240 FloatRegBits val) 241 { 242 int reg_idx = si->destRegIdx(idx) - TheISA::FP_Base_DepTag; 243 thread->setFloatRegBits(reg_idx, val); 244 result.integer = val; 245 } 246 247 uint64_t readPC() { return thread->readPC(); } --- 134 unchanged lines hidden --- |