regfile.hh (13611:c8b7847b4171) regfile.hh (13622:ba31c2a23eca)
1/*
2 * Copyright (c) 2016-2017 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

60
61/**
62 * Simple physical register file class.
63 */
64class PhysRegFile
65{
66 private:
67
1/*
2 * Copyright (c) 2016-2017 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

60
61/**
62 * Simple physical register file class.
63 */
64class PhysRegFile
65{
66 private:
67
68 typedef TheISA::CCReg CCReg;
69 using VecElem = TheISA::VecElem;
70 using VecRegContainer = TheISA::VecRegContainer;
71 using PhysIds = std::vector<PhysRegId>;
72 using VecMode = Enums::VecRegRenameMode;
73 using VecPredRegContainer = TheISA::VecPredRegContainer;
74 public:
75 using IdRange = std::pair<PhysIds::const_iterator,
76 PhysIds::const_iterator>;

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

90 std::vector<PhysRegId> vecRegIds;
91 std::vector<PhysRegId> vecElemIds;
92
93 /** Predicate register file. */
94 std::vector<VecPredRegContainer> vecPredRegFile;
95 std::vector<PhysRegId> vecPredRegIds;
96
97 /** Condition-code register file. */
68 using VecElem = TheISA::VecElem;
69 using VecRegContainer = TheISA::VecRegContainer;
70 using PhysIds = std::vector<PhysRegId>;
71 using VecMode = Enums::VecRegRenameMode;
72 using VecPredRegContainer = TheISA::VecPredRegContainer;
73 public:
74 using IdRange = std::pair<PhysIds::const_iterator,
75 PhysIds::const_iterator>;

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

89 std::vector<PhysRegId> vecRegIds;
90 std::vector<PhysRegId> vecElemIds;
91
92 /** Predicate register file. */
93 std::vector<VecPredRegContainer> vecPredRegFile;
94 std::vector<PhysRegId> vecPredRegIds;
95
96 /** Condition-code register file. */
98 std::vector<CCReg> ccRegFile;
97 std::vector<RegVal> ccRegFile;
99 std::vector<PhysRegId> ccRegIds;
100
101 /** Misc Reg Ids */
102 std::vector<PhysRegId> miscRegIds;
103
104 /**
105 * Number of physical general purpose registers
106 */

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

285
286 VecPredRegContainer& getWritableVecPredReg(PhysRegIdPtr phys_reg)
287 {
288 /* const_cast for not duplicating code above. */
289 return const_cast<VecPredRegContainer&>(readVecPredReg(phys_reg));
290 }
291
292 /** Reads a condition-code register. */
98 std::vector<PhysRegId> ccRegIds;
99
100 /** Misc Reg Ids */
101 std::vector<PhysRegId> miscRegIds;
102
103 /**
104 * Number of physical general purpose registers
105 */

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

284
285 VecPredRegContainer& getWritableVecPredReg(PhysRegIdPtr phys_reg)
286 {
287 /* const_cast for not duplicating code above. */
288 return const_cast<VecPredRegContainer&>(readVecPredReg(phys_reg));
289 }
290
291 /** Reads a condition-code register. */
293 CCReg
292 RegVal
294 readCCReg(PhysRegIdPtr phys_reg)
295 {
296 assert(phys_reg->isCCPhysReg());
297
298 DPRINTF(IEW, "RegFile: Access to cc register %i, has "
299 "data %#x\n", phys_reg->index(),
300 ccRegFile[phys_reg->index()]);
301

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

360 DPRINTF(IEW, "RegFile: Setting predicate register %i to %s\n",
361 int(phys_reg->index()), val.print());
362
363 vecPredRegFile[phys_reg->index()] = val;
364 }
365
366 /** Sets a condition-code register to the given value. */
367 void
293 readCCReg(PhysRegIdPtr phys_reg)
294 {
295 assert(phys_reg->isCCPhysReg());
296
297 DPRINTF(IEW, "RegFile: Access to cc register %i, has "
298 "data %#x\n", phys_reg->index(),
299 ccRegFile[phys_reg->index()]);
300

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

359 DPRINTF(IEW, "RegFile: Setting predicate register %i to %s\n",
360 int(phys_reg->index()), val.print());
361
362 vecPredRegFile[phys_reg->index()] = val;
363 }
364
365 /** Sets a condition-code register to the given value. */
366 void
368 setCCReg(PhysRegIdPtr phys_reg, CCReg val)
367 setCCReg(PhysRegIdPtr phys_reg, RegVal val)
369 {
370 assert(phys_reg->isCCPhysReg());
371
372 DPRINTF(IEW, "RegFile: Setting cc register %i to %#x\n",
373 phys_reg->index(), (uint64_t)val);
374
375 ccRegFile[phys_reg->index()] = val;
376 }

--- 23 unchanged lines hidden ---
368 {
369 assert(phys_reg->isCCPhysReg());
370
371 DPRINTF(IEW, "RegFile: Setting cc register %i to %#x\n",
372 phys_reg->index(), (uint64_t)val);
373
374 ccRegFile[phys_reg->index()] = val;
375 }

--- 23 unchanged lines hidden ---