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 namespace dart { | 8 namespace dart { |
9 | 9 |
10 enum Register { | 10 enum Register { |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 const Register CTX = S6; // Caches current context in generated code. | 143 const Register CTX = S6; // Caches current context in generated code. |
144 const Register PP = S7; // Caches object pool pointer in generated code. | 144 const Register PP = S7; // Caches object pool pointer in generated code. |
145 const Register SPREG = SP; // Stack pointer register. | 145 const Register SPREG = SP; // Stack pointer register. |
146 const Register FPREG = FP; // Frame pointer register. | 146 const Register FPREG = FP; // Frame pointer register. |
147 | 147 |
148 // The code that generates a comparison can be far away from the code that | 148 // The code that generates a comparison can be far away from the code that |
149 // generates the branch that uses the result of that comparison. In this case, | 149 // generates the branch that uses the result of that comparison. In this case, |
150 // CMPRES is used for the result of the comparison. | 150 // CMPRES is used for the result of the comparison. |
151 const Register CMPRES = T8; | 151 const Register CMPRES = T8; |
152 | 152 |
| 153 // Exception object is passed in this register to the catch handlers when an |
| 154 // exception is thrown. |
| 155 const Register kExceptionObjectReg = A0; |
| 156 |
| 157 // Stack trace object is passed in this register to the catch handlers when |
| 158 // an exception is thrown. |
| 159 const Register kStackTraceObjectReg = A1; |
| 160 |
| 161 |
153 typedef uint32_t RegList; | 162 typedef uint32_t RegList; |
154 const RegList kAllCpuRegistersList = 0xFFFFFFFF; | 163 const RegList kAllCpuRegistersList = 0xFFFFFFFF; |
155 | 164 |
156 | 165 |
157 const RegList kAbiArgumentCpuRegs = | 166 const RegList kAbiArgumentCpuRegs = |
158 (1 << A0) | (1 << A1) | (1 << A2) | (1 << A3); | 167 (1 << A0) | (1 << A1) | (1 << A2) | (1 << A3); |
159 const RegList kAbiPreservedCpuRegs = | 168 const RegList kAbiPreservedCpuRegs = |
160 (1 << S0) | (1 << S1) | (1 << S2) | (1 << S3) | | 169 (1 << S0) | (1 << S1) | (1 << S2) | (1 << S3) | |
161 (1 << S4) | (1 << S5) | (1 << S6) | (1 << S7); | 170 (1 << S4) | (1 << S5) | (1 << S6) | (1 << S7); |
162 const int kAbiPreservedCpuRegCount = 8; | 171 const int kAbiPreservedCpuRegCount = 8; |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } | 502 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } |
494 | 503 |
495 private: | 504 private: |
496 DISALLOW_ALLOCATION(); | 505 DISALLOW_ALLOCATION(); |
497 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); | 506 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); |
498 }; | 507 }; |
499 | 508 |
500 } // namespace dart | 509 } // namespace dart |
501 | 510 |
502 #endif // VM_CONSTANTS_MIPS_H_ | 511 #endif // VM_CONSTANTS_MIPS_H_ |
OLD | NEW |