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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 D11 = 11, | 149 D11 = 11, |
150 D12 = 12, | 150 D12 = 12, |
151 D13 = 13, | 151 D13 = 13, |
152 D14 = 14, | 152 D14 = 14, |
153 D15 = 15, | 153 D15 = 15, |
154 D16 = 16, | 154 D16 = 16, |
155 kNumberOfDRegisters = 16, | 155 kNumberOfDRegisters = 16, |
156 kNoDRegister = -1, | 156 kNoDRegister = -1, |
157 }; | 157 }; |
158 | 158 |
| 159 const DRegister DTMP = D9; |
| 160 const FRegister STMP1 = F18; |
| 161 const FRegister STMP2 = F19; |
| 162 |
159 // Architecture independent aliases. | 163 // Architecture independent aliases. |
160 typedef DRegister FpuRegister; | 164 typedef DRegister FpuRegister; |
161 const FpuRegister FpuTMP = D0; | 165 const FpuRegister FpuTMP = DTMP; |
162 const int kNumberOfFpuRegisters = kNumberOfDRegisters; | 166 const int kNumberOfFpuRegisters = kNumberOfDRegisters; |
163 const FpuRegister kNoFpuRegister = kNoDRegister; | 167 const FpuRegister kNoFpuRegister = kNoDRegister; |
164 | 168 |
165 | 169 |
166 // Register aliases. | 170 // Register aliases. |
167 const Register TMP1 = AT; // Used as scratch register by assembler. | 171 const Register TMP1 = AT; // Used as scratch register by assembler. |
168 const Register TMP = TMP1; // Arch independent flow graph compiler needs a | 172 const Register TMP = TMP1; // Arch independent flow graph compiler needs a |
169 // Register called TMP. | 173 // Register called TMP. |
170 const Register CTX = S6; // Caches current context in generated code. | 174 const Register CTX = S6; // Caches current context in generated code. |
171 const Register PP = S7; // Caches object pool pointer in generated code. | 175 const Register PP = S7; // Caches object pool pointer in generated code. |
172 const Register SPREG = SP; // Stack pointer register. | 176 const Register SPREG = SP; // Stack pointer register. |
173 const Register FPREG = FP; // Frame pointer register. | 177 const Register FPREG = FP; // Frame pointer register. |
174 | 178 |
175 // NULLREG holds reinterpret_cast<intptr_t>(Object::null()). | |
176 // TODO(zra): Is it worthwhile to devote a register to this? Investigate | |
177 // performance effects when we are running on real hardware. Same with | |
178 // CMPRES. Try moving CTX and PP to T8 and T9 and shifting kLastCpuRegister | |
179 // down to S7. | |
180 const Register NULLREG = T8; | |
181 | |
182 // The code that generates a comparison can be far away from the code that | 179 // The code that generates a comparison can be far away from the code that |
183 // generates the branch that uses the result of that comparison. In this case, | 180 // generates the branch that uses the result of that comparison. In this case, |
184 // CMPRES is used for the result of the comparison. | 181 // CMPRES is used for the result of the comparison. |
185 const Register CMPRES = T9; | 182 const Register CMPRES = T9; |
186 | 183 |
187 // Exception object is passed in this register to the catch handlers when an | 184 // Exception object is passed in this register to the catch handlers when an |
188 // exception is thrown. | 185 // exception is thrown. |
189 const Register kExceptionObjectReg = V0; | 186 const Register kExceptionObjectReg = V0; |
190 | 187 |
191 // Stack trace object is passed in this register to the catch handlers when | 188 // Stack trace object is passed in this register to the catch handlers when |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 #endif // defined(DEBUG) | 590 #endif // defined(DEBUG) |
594 | 591 |
595 private: | 592 private: |
596 DISALLOW_ALLOCATION(); | 593 DISALLOW_ALLOCATION(); |
597 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); | 594 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); |
598 }; | 595 }; |
599 | 596 |
600 } // namespace dart | 597 } // namespace dart |
601 | 598 |
602 #endif // VM_CONSTANTS_MIPS_H_ | 599 #endif // VM_CONSTANTS_MIPS_H_ |
OLD | NEW |