49,54c49,50
< * so integer and floating-point registers are not distinguished. For
< * convenience, it also accepts operations on the physical-space
< * mapping of misc registers, which are numbered starting after the
< * end of the actual physical register file. However, there is no
< * actual scoreboard for misc registers, and they are always
< * considered ready.
---
> * because the different classes of registers do not need to be distinguished.
> * Registers being part of a fixed mapping are always considered ready.
70,88d65
< /**
< * The total number of registers which can be indexed, including
< * the misc registers that come after the physical registers and
< * which are hardwired to be always considered ready.
< */
< unsigned M5_CLASS_VAR_USED numTotalRegs;
<
< /** The index of the zero register. */
< PhysRegIndex zeroRegIdx;
<
< /** The index of the FP zero register. */
< PhysRegIndex fpZeroRegIdx;
<
< bool isZeroReg(PhysRegIndex idx) const
< {
< return (idx == zeroRegIdx ||
< (THE_ISA == ALPHA_ISA && idx == fpZeroRegIdx));
< }
<
93,95d69
< * @param _zeroRegIdx Index of the zero register.
< * @param _fpZeroRegIdx Index of the FP zero register (if any, currently
< * used only for Alpha).
98,101c72
< unsigned _numPhysicalRegs,
< unsigned _numMiscRegs,
< PhysRegIndex _zeroRegIdx,
< PhysRegIndex _fpZeroRegIdx);
---
> unsigned _numPhysicalRegs);
110c81
< bool getReg(PhysRegIndex reg_idx) const
---
> bool getReg(PhysRegIdPtr phys_reg) const
112c83
< assert(reg_idx < numTotalRegs);
---
> assert(phys_reg->flatIdx < numPhysRegs);
114,115c85,86
< if (reg_idx >= numPhysRegs) {
< // misc regs are always ready
---
> if (phys_reg->isFixedMapping()) {
> // Fixed mapping regs are always ready
119c90
< bool ready = regScoreBoard[reg_idx];
---
> bool ready = regScoreBoard[phys_reg->flatIdx];
121c92
< if (isZeroReg(reg_idx))
---
> if (phys_reg->isZeroReg())
128c99
< void setReg(PhysRegIndex reg_idx)
---
> void setReg(PhysRegIdPtr phys_reg)
130c101
< assert(reg_idx < numTotalRegs);
---
> assert(phys_reg->flatIdx < numPhysRegs);
132,133c103,105
< if (reg_idx >= numPhysRegs) {
< // misc regs are always ready, ignore attempts to change that
---
> if (phys_reg->isFixedMapping()) {
> // Fixed mapping regs are always ready, ignore attempts to change
> // that
137c109,110
< DPRINTF(Scoreboard, "Setting reg %i as ready\n", reg_idx);
---
> DPRINTF(Scoreboard, "Setting reg %i (%s) as ready\n", phys_reg->regIdx,
> RegClassStrings[phys_reg->regClass]);
139,140c112
< assert(reg_idx < numTotalRegs);
< regScoreBoard[reg_idx] = true;
---
> regScoreBoard[phys_reg->flatIdx] = true;
144c116
< void unsetReg(PhysRegIndex reg_idx)
---
> void unsetReg(PhysRegIdPtr phys_reg)
146c118
< assert(reg_idx < numTotalRegs);
---
> assert(phys_reg->flatIdx < numPhysRegs);
148,149c120,122
< if (reg_idx >= numPhysRegs) {
< // misc regs are always ready, ignore attempts to change that
---
> if (phys_reg->isFixedMapping()) {
> // Fixed mapping regs are always ready, ignore attempts to
> // change that
154c127
< if (isZeroReg(reg_idx))
---
> if (phys_reg->isZeroReg())
157c130
< regScoreBoard[reg_idx] = false;
---
> regScoreBoard[phys_reg->flatIdx] = false;