regfile.hh (6313:95f69a436c82) regfile.hh (6314:781969fbeca9)
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;

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

88 {
89 assert(reg_idx < numPhysicalIntRegs);
90
91 DPRINTF(IEW, "RegFile: Access to int register %i, has data "
92 "%#x\n", int(reg_idx), intRegFile[reg_idx]);
93 return intRegFile[reg_idx];
94 }
95
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;

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

88 {
89 assert(reg_idx < numPhysicalIntRegs);
90
91 DPRINTF(IEW, "RegFile: Access to int register %i, has data "
92 "%#x\n", int(reg_idx), intRegFile[reg_idx]);
93 return intRegFile[reg_idx];
94 }
95
96 FloatReg readFloatReg(PhysRegIndex reg_idx, int width)
97 {
98 // Remove the base Float reg dependency.
99 reg_idx = reg_idx - numPhysicalIntRegs;
100
101 assert(reg_idx < numPhysicalFloatRegs + numPhysicalIntRegs);
102
103 FloatReg floatReg = floatRegFile[reg_idx].d;
104
105 DPRINTF(IEW, "RegFile: Access to %d byte float register %i, has "
106 "data %#x\n", int(reg_idx), floatRegFile[reg_idx].q);
107
108 return floatReg;
109 }
110
111 /** Reads a floating point register (double precision). */
112 FloatReg readFloatReg(PhysRegIndex reg_idx)
113 {
114 // Remove the base Float reg dependency.
115 reg_idx = reg_idx - numPhysicalIntRegs;
116
117 assert(reg_idx < numPhysicalFloatRegs + numPhysicalIntRegs);
118
119 FloatReg floatReg = floatRegFile[reg_idx].d;
120
121 DPRINTF(IEW, "RegFile: Access to float register %i, has "
122 "data %#x\n", int(reg_idx), floatRegFile[reg_idx].q);
123
124 return floatReg;
125 }
126
96 /** Reads a floating point register (double precision). */
97 FloatReg readFloatReg(PhysRegIndex reg_idx)
98 {
99 // Remove the base Float reg dependency.
100 reg_idx = reg_idx - numPhysicalIntRegs;
101
102 assert(reg_idx < numPhysicalFloatRegs + numPhysicalIntRegs);
103
104 FloatReg floatReg = floatRegFile[reg_idx].d;
105
106 DPRINTF(IEW, "RegFile: Access to float register %i, has "
107 "data %#x\n", int(reg_idx), floatRegFile[reg_idx].q);
108
109 return floatReg;
110 }
111
127 /** Reads a floating point register as an integer. */
128 FloatRegBits readFloatRegBits(PhysRegIndex reg_idx, int width)
129 {
130 // Remove the base Float reg dependency.
131 reg_idx = reg_idx - numPhysicalIntRegs;
132
133 assert(reg_idx < numPhysicalFloatRegs + numPhysicalIntRegs);
134
135 FloatRegBits floatRegBits = floatRegFile[reg_idx].q;
136
137 DPRINTF(IEW, "RegFile: Access to float register %i as int, "
138 "has data %#x\n", int(reg_idx), (uint64_t)floatRegBits);
139
140 return floatRegBits;
141 }
142
143 FloatRegBits readFloatRegBits(PhysRegIndex reg_idx)
144 {
145 // Remove the base Float reg dependency.
146 reg_idx = reg_idx - numPhysicalIntRegs;
147
148 assert(reg_idx < numPhysicalFloatRegs + numPhysicalIntRegs);
149
150 FloatRegBits floatRegBits = floatRegFile[reg_idx].q;

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

162
163 DPRINTF(IEW, "RegFile: Setting int register %i to %#x\n",
164 int(reg_idx), val);
165
166 if (reg_idx != TheISA::ZeroReg)
167 intRegFile[reg_idx] = val;
168 }
169
112 FloatRegBits readFloatRegBits(PhysRegIndex reg_idx)
113 {
114 // Remove the base Float reg dependency.
115 reg_idx = reg_idx - numPhysicalIntRegs;
116
117 assert(reg_idx < numPhysicalFloatRegs + numPhysicalIntRegs);
118
119 FloatRegBits floatRegBits = floatRegFile[reg_idx].q;

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

131
132 DPRINTF(IEW, "RegFile: Setting int register %i to %#x\n",
133 int(reg_idx), val);
134
135 if (reg_idx != TheISA::ZeroReg)
136 intRegFile[reg_idx] = val;
137 }
138
170 /** Sets a single precision floating point register to the given value. */
171 void setFloatReg(PhysRegIndex reg_idx, FloatReg val, int width)
172 {
173 // Remove the base Float reg dependency.
174 reg_idx = reg_idx - numPhysicalIntRegs;
175
176 assert(reg_idx < numPhysicalFloatRegs);
177
178 DPRINTF(IEW, "RegFile: Setting float register %i to %#x\n",
179 int(reg_idx), (uint64_t)val);
180
181#if THE_ISA == ALPHA_ISA
182 if (reg_idx != TheISA::ZeroReg)
183#endif
184 floatRegFile[reg_idx].d = val;
185 }
186
187 /** Sets a double precision floating point register to the given value. */
188 void setFloatReg(PhysRegIndex reg_idx, FloatReg val)
189 {
190 // Remove the base Float reg dependency.
191 reg_idx = reg_idx - numPhysicalIntRegs;
192
193 assert(reg_idx < numPhysicalFloatRegs);
194
195 DPRINTF(IEW, "RegFile: Setting float register %i to %#x\n",
196 int(reg_idx), (uint64_t)val);
197
198#if THE_ISA == ALPHA_ISA
199 if (reg_idx != TheISA::ZeroReg)
200#endif
201 floatRegFile[reg_idx].d = val;
202 }
203
139 /** Sets a double precision floating point register to the given value. */
140 void setFloatReg(PhysRegIndex reg_idx, FloatReg val)
141 {
142 // Remove the base Float reg dependency.
143 reg_idx = reg_idx - numPhysicalIntRegs;
144
145 assert(reg_idx < numPhysicalFloatRegs);
146
147 DPRINTF(IEW, "RegFile: Setting float register %i to %#x\n",
148 int(reg_idx), (uint64_t)val);
149
150#if THE_ISA == ALPHA_ISA
151 if (reg_idx != TheISA::ZeroReg)
152#endif
153 floatRegFile[reg_idx].d = val;
154 }
155
204 /** Sets a floating point register to the given integer value. */
205 void setFloatRegBits(PhysRegIndex reg_idx, FloatRegBits val, int width)
206 {
207 // Remove the base Float reg dependency.
208 reg_idx = reg_idx - numPhysicalIntRegs;
209
210 assert(reg_idx < numPhysicalFloatRegs);
211
212 DPRINTF(IEW, "RegFile: Setting float register %i to %#x\n",
213 int(reg_idx), (uint64_t)val);
214
215 floatRegFile[reg_idx].q = val;
216 }
217
218 void setFloatRegBits(PhysRegIndex reg_idx, FloatRegBits val)
219 {
220 // Remove the base Float reg dependency.
221 reg_idx = reg_idx - numPhysicalIntRegs;
222
223 assert(reg_idx < numPhysicalFloatRegs);
224
225 DPRINTF(IEW, "RegFile: Setting float register %i to %#x\n",

--- 42 unchanged lines hidden ---
156 void setFloatRegBits(PhysRegIndex reg_idx, FloatRegBits val)
157 {
158 // Remove the base Float reg dependency.
159 reg_idx = reg_idx - numPhysicalIntRegs;
160
161 assert(reg_idx < numPhysicalFloatRegs);
162
163 DPRINTF(IEW, "RegFile: Setting float register %i to %#x\n",

--- 42 unchanged lines hidden ---