1/*
2 * Copyright (c) 2004-2005 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;

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

59 * Pair of a physical register and a physical register. Used to
60 * return the physical register that a logical register has been
61 * renamed to, and the previous physical register that the same
62 * logical register was previously mapped to.
63 */
64 typedef std::pair<PhysRegIndex, PhysRegIndex> RenameInfo;
65
66 public:
67 //Constructor
68 SimpleRenameMap() {};
67 /** Default constructor. init() must be called prior to use. */
68 SimpleRenameMap() {};
69
70 /** Destructor. */
71 ~SimpleRenameMap();
72
73 /** Initializes rename map with given parameters. */
74 void init(unsigned _numLogicalIntRegs,
75 unsigned _numPhysicalIntRegs,
76 PhysRegIndex &_int_reg_start,
77
78 unsigned _numLogicalFloatRegs,
79 unsigned _numPhysicalFloatRegs,
80 PhysRegIndex &_float_reg_start,
81
82 unsigned _numMiscRegs,
83
84 RegIndex _intZeroReg,
85 RegIndex _floatZeroReg,
86
87 int id,
88 bool bindRegs);
89
90 /** Sets the free list used with this rename map. */
91 void setFreeList(SimpleFreeList *fl_ptr);
92
93 //Tell rename map to get a free physical register for a given
94 //architected register. Not sure it should have a return value,
95 //but perhaps it should have some sort of fault in case there are
96 //no free registers.
97 RenameInfo rename(RegIndex arch_reg);
98

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

148 PhysRegIndex physical_reg;
149 bool valid;
150
151 RenameEntry()
152 : physical_reg(0), valid(false)
153 { }
154 };
155
154 //Change this to private
156 private:
157 /** Integer rename map. */
158 std::vector<RenameEntry> intRenameMap;
159
160 /** Floating point rename map. */
161 std::vector<RenameEntry> floatRenameMap;
162
163 private:
164 /** Free list interface. */
165 SimpleFreeList *freeList;
166};
167
168#endif //__CPU_O3_RENAME_MAP_HH__