2a3
> * Copyright (c) 2013 Advanced Micro Devices, Inc.
35,44c36,38
< SimpleFreeList::SimpleFreeList(ThreadID activeThreads,
< unsigned _numLogicalIntRegs,
< unsigned _numPhysicalIntRegs,
< unsigned _numLogicalFloatRegs,
< unsigned _numPhysicalFloatRegs)
< : numLogicalIntRegs(_numLogicalIntRegs),
< numPhysicalIntRegs(_numPhysicalIntRegs),
< numLogicalFloatRegs(_numLogicalFloatRegs),
< numPhysicalFloatRegs(_numPhysicalFloatRegs),
< numPhysicalRegs(numPhysicalIntRegs + numPhysicalFloatRegs)
---
> UnifiedFreeList::UnifiedFreeList(const std::string &_my_name,
> PhysRegFile *_regFile)
> : _name(_my_name), regFile(_regFile)
48,65c42,44
< // Put all of the extra physical registers onto the free list. This
< // means excluding all of the base logical registers.
< for (PhysRegIndex i = numLogicalIntRegs * activeThreads;
< i < numPhysicalIntRegs; ++i)
< {
< freeIntRegs.push(i);
< }
<
< // Put all of the extra physical registers onto the free list. This
< // means excluding all of the base logical registers. Because the
< // float registers' indices start where the physical registers end,
< // some math must be done to determine where the free registers start.
< PhysRegIndex i = numPhysicalIntRegs + (numLogicalFloatRegs * activeThreads);
<
< for ( ; i < numPhysicalRegs; ++i)
< {
< freeFloatRegs.push(i);
< }
---
> // Have the register file initialize the free list since it knows
> // about its internal organization
> regFile->initFreeList(this);
67,72d45
<
< std::string
< SimpleFreeList::name() const
< {
< return "cpu.freelist";
< }