cpu.cc (6031:be16ad28822f) | cpu.cc (6032:e5c792a67b3d) |
---|---|
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; --- 1269 unchanged lines hidden (view full) --- 1278 1279 return regFile.readIntReg(phys_reg); 1280} 1281 1282template <class Impl> 1283float 1284FullO3CPU<Impl>::readArchFloatRegSingle(int reg_idx, unsigned tid) 1285{ | 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; --- 1269 unchanged lines hidden (view full) --- 1278 1279 return regFile.readIntReg(phys_reg); 1280} 1281 1282template <class Impl> 1283float 1284FullO3CPU<Impl>::readArchFloatRegSingle(int reg_idx, unsigned tid) 1285{ |
1286 int idx = reg_idx + TheISA::FP_Base_DepTag; | 1286 int idx = reg_idx + TheISA::NumIntRegs; |
1287 PhysRegIndex phys_reg = commitRenameMap[tid].lookup(idx); 1288 1289 return regFile.readFloatReg(phys_reg); 1290} 1291 1292template <class Impl> 1293double 1294FullO3CPU<Impl>::readArchFloatRegDouble(int reg_idx, unsigned tid) 1295{ | 1287 PhysRegIndex phys_reg = commitRenameMap[tid].lookup(idx); 1288 1289 return regFile.readFloatReg(phys_reg); 1290} 1291 1292template <class Impl> 1293double 1294FullO3CPU<Impl>::readArchFloatRegDouble(int reg_idx, unsigned tid) 1295{ |
1296 int idx = reg_idx + TheISA::FP_Base_DepTag; | 1296 int idx = reg_idx + TheISA::NumIntRegs; |
1297 PhysRegIndex phys_reg = commitRenameMap[tid].lookup(idx); 1298 1299 return regFile.readFloatReg(phys_reg, 64); 1300} 1301 1302template <class Impl> 1303uint64_t 1304FullO3CPU<Impl>::readArchFloatRegInt(int reg_idx, unsigned tid) 1305{ | 1297 PhysRegIndex phys_reg = commitRenameMap[tid].lookup(idx); 1298 1299 return regFile.readFloatReg(phys_reg, 64); 1300} 1301 1302template <class Impl> 1303uint64_t 1304FullO3CPU<Impl>::readArchFloatRegInt(int reg_idx, unsigned tid) 1305{ |
1306 int idx = reg_idx + TheISA::FP_Base_DepTag; | 1306 int idx = reg_idx + TheISA::NumIntRegs; |
1307 PhysRegIndex phys_reg = commitRenameMap[tid].lookup(idx); 1308 1309 return regFile.readFloatRegBits(phys_reg); 1310} 1311 1312template <class Impl> 1313void 1314FullO3CPU<Impl>::setArchIntReg(int reg_idx, uint64_t val, unsigned tid) 1315{ 1316 PhysRegIndex phys_reg = commitRenameMap[tid].lookup(reg_idx); 1317 1318 regFile.setIntReg(phys_reg, val); 1319} 1320 1321template <class Impl> 1322void 1323FullO3CPU<Impl>::setArchFloatRegSingle(int reg_idx, float val, unsigned tid) 1324{ | 1307 PhysRegIndex phys_reg = commitRenameMap[tid].lookup(idx); 1308 1309 return regFile.readFloatRegBits(phys_reg); 1310} 1311 1312template <class Impl> 1313void 1314FullO3CPU<Impl>::setArchIntReg(int reg_idx, uint64_t val, unsigned tid) 1315{ 1316 PhysRegIndex phys_reg = commitRenameMap[tid].lookup(reg_idx); 1317 1318 regFile.setIntReg(phys_reg, val); 1319} 1320 1321template <class Impl> 1322void 1323FullO3CPU<Impl>::setArchFloatRegSingle(int reg_idx, float val, unsigned tid) 1324{ |
1325 int idx = reg_idx + TheISA::FP_Base_DepTag; | 1325 int idx = reg_idx + TheISA::NumIntRegs; |
1326 PhysRegIndex phys_reg = commitRenameMap[tid].lookup(idx); 1327 1328 regFile.setFloatReg(phys_reg, val); 1329} 1330 1331template <class Impl> 1332void 1333FullO3CPU<Impl>::setArchFloatRegDouble(int reg_idx, double val, unsigned tid) 1334{ | 1326 PhysRegIndex phys_reg = commitRenameMap[tid].lookup(idx); 1327 1328 regFile.setFloatReg(phys_reg, val); 1329} 1330 1331template <class Impl> 1332void 1333FullO3CPU<Impl>::setArchFloatRegDouble(int reg_idx, double val, unsigned tid) 1334{ |
1335 int idx = reg_idx + TheISA::FP_Base_DepTag; | 1335 int idx = reg_idx + TheISA::NumIntRegs; |
1336 PhysRegIndex phys_reg = commitRenameMap[tid].lookup(idx); 1337 1338 regFile.setFloatReg(phys_reg, val, 64); 1339} 1340 1341template <class Impl> 1342void 1343FullO3CPU<Impl>::setArchFloatRegInt(int reg_idx, uint64_t val, unsigned tid) 1344{ | 1336 PhysRegIndex phys_reg = commitRenameMap[tid].lookup(idx); 1337 1338 regFile.setFloatReg(phys_reg, val, 64); 1339} 1340 1341template <class Impl> 1342void 1343FullO3CPU<Impl>::setArchFloatRegInt(int reg_idx, uint64_t val, unsigned tid) 1344{ |
1345 int idx = reg_idx + TheISA::FP_Base_DepTag; | 1345 int idx = reg_idx + TheISA::NumIntRegs; |
1346 PhysRegIndex phys_reg = commitRenameMap[tid].lookup(idx); 1347 1348 regFile.setFloatRegBits(phys_reg, val); 1349} 1350 1351template <class Impl> 1352uint64_t 1353FullO3CPU<Impl>::readPC(unsigned tid) --- 355 unchanged lines hidden --- | 1346 PhysRegIndex phys_reg = commitRenameMap[tid].lookup(idx); 1347 1348 regFile.setFloatRegBits(phys_reg, val); 1349} 1350 1351template <class Impl> 1352uint64_t 1353FullO3CPU<Impl>::readPC(unsigned tid) --- 355 unchanged lines hidden --- |