OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef VM_CONSTANTS_MIPS_H_ | 5 #ifndef VM_CONSTANTS_MIPS_H_ |
6 #define VM_CONSTANTS_MIPS_H_ | 6 #define VM_CONSTANTS_MIPS_H_ |
7 | 7 |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 | 9 |
10 namespace dart { | 10 namespace dart { |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 const int kDartVolatileCpuRegCount = 14; | 195 const int kDartVolatileCpuRegCount = 14; |
196 const Register kDartFirstVolatileCpuReg = R2; | 196 const Register kDartFirstVolatileCpuReg = R2; |
197 const Register kDartLastVolatileCpuReg = R15; | 197 const Register kDartLastVolatileCpuReg = R15; |
198 | 198 |
199 // FPU registers 0 - 19 are not preserved across calls. | 199 // FPU registers 0 - 19 are not preserved across calls. |
200 const FRegister kDartFirstVolatileFpuReg = F0; | 200 const FRegister kDartFirstVolatileFpuReg = F0; |
201 const FRegister kDartLastVolatileFpuReg = F19; | 201 const FRegister kDartLastVolatileFpuReg = F19; |
202 const int kDartVolatileFpuRegCount = 20; | 202 const int kDartVolatileFpuRegCount = 20; |
203 | 203 |
204 | 204 |
205 // TODO(regis): Move these constants to stack_frame_mips.h. | |
206 // Dart stack frame layout. | |
207 static const int kLastParamSlotIndex = 3; // From fp. | |
208 static const int kFirstLocalSlotIndex = -2; // From fp. | |
209 static const int kPcSlotIndexFromSp = -2; | |
210 | |
211 /* MIPS Dart Frame Layout | |
212 | |
213 | | <- TOS | |
214 Callee frame | ... | | |
215 | current RA | (PC of current frame) | |
216 | PC Marker | (callee's frame code entry) | |
217 +-------------------+ | |
218 Current frame | ... | <- SP of current frame | |
219 | first local | | |
220 | caller's PP | | |
221 | caller's FP | <- FP of current frame | |
222 | caller's RA | (PC of caller frame) | |
223 | PC Marker | (current frame's code entry) | |
224 +-------------------+ | |
225 Caller frame | last parameter | | |
226 | ... | | |
227 */ | |
228 | |
229 | |
230 // Values for the condition field. | 205 // Values for the condition field. |
231 // There is no condition field on MIPS, but Conditions are used and passed | 206 // There is no condition field on MIPS, but Conditions are used and passed |
232 // around by the intermediate language, so we need them here, too. | 207 // around by the intermediate language, so we need them here, too. |
233 enum Condition { | 208 enum Condition { |
234 EQ, // equal | 209 EQ, // equal |
235 NE, // not equal | 210 NE, // not equal |
236 GT, // greater than | 211 GT, // greater than |
237 GE, // greater equal | 212 GE, // greater equal |
238 LT, // less than | 213 LT, // less than |
239 LE, // less equal | 214 LE, // less equal |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 #endif // defined(DEBUG) | 541 #endif // defined(DEBUG) |
567 | 542 |
568 private: | 543 private: |
569 DISALLOW_ALLOCATION(); | 544 DISALLOW_ALLOCATION(); |
570 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); | 545 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); |
571 }; | 546 }; |
572 | 547 |
573 } // namespace dart | 548 } // namespace dart |
574 | 549 |
575 #endif // VM_CONSTANTS_MIPS_H_ | 550 #endif // VM_CONSTANTS_MIPS_H_ |
OLD | NEW |