| 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_ARM_H_ | 5 #ifndef VM_CONSTANTS_ARM_H_ |
| 6 #define VM_CONSTANTS_ARM_H_ | 6 #define VM_CONSTANTS_ARM_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 157 |
| 158 static inline DRegister EvenDRegisterOf(QRegister q) { | 158 static inline DRegister EvenDRegisterOf(QRegister q) { |
| 159 return static_cast<DRegister>(q * 2); | 159 return static_cast<DRegister>(q * 2); |
| 160 } | 160 } |
| 161 | 161 |
| 162 static inline DRegister OddDRegisterOf(QRegister q) { | 162 static inline DRegister OddDRegisterOf(QRegister q) { |
| 163 return static_cast<DRegister>((q * 2) + 1); | 163 return static_cast<DRegister>((q * 2) + 1); |
| 164 } | 164 } |
| 165 | 165 |
| 166 | 166 |
| 167 static inline SRegister EvenSRegisterOf(DRegister d) { |
| 168 return static_cast<SRegister>(d * 2); |
| 169 } |
| 170 |
| 171 static inline SRegister OddSRegisterOf(DRegister d) { |
| 172 return static_cast<SRegister>((d * 2) + 1); |
| 173 } |
| 174 |
| 175 |
| 167 // Register aliases for floating point scratch registers. | 176 // Register aliases for floating point scratch registers. |
| 168 const QRegister QTMP = Q7; // Overlaps with DTMP, STMP. | 177 const QRegister QTMP = Q7; // Overlaps with DTMP, STMP. |
| 169 const DRegister DTMP = D14; // Overlaps with STMP. | 178 const DRegister DTMP = EvenDRegisterOf(QTMP); // Overlaps with STMP. |
| 170 const SRegister STMP = S28; | 179 const SRegister STMP = EvenSRegisterOf(DTMP); |
| 171 | 180 |
| 172 // Architecture independent aliases. | 181 // Architecture independent aliases. |
| 173 typedef QRegister FpuRegister; | 182 typedef QRegister FpuRegister; |
| 174 const FpuRegister FpuTMP = QTMP; | 183 const FpuRegister FpuTMP = QTMP; |
| 175 const int kNumberOfFpuRegisters = kNumberOfQRegisters; | 184 const int kNumberOfFpuRegisters = kNumberOfQRegisters; |
| 176 const FpuRegister kNoFpuRegister = kNoQRegister; | 185 const FpuRegister kNoFpuRegister = kNoQRegister; |
| 177 | 186 |
| 178 // Register aliases. | 187 // Register aliases. |
| 179 const Register TMP = IP; // Used as scratch register by assembler. | 188 const Register TMP = IP; // Used as scratch register by assembler. |
| 180 const Register CTX = R9; // Caches current context in generated code. | 189 const Register CTX = R9; // Caches current context in generated code. |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } | 648 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } |
| 640 | 649 |
| 641 private: | 650 private: |
| 642 DISALLOW_ALLOCATION(); | 651 DISALLOW_ALLOCATION(); |
| 643 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); | 652 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); |
| 644 }; | 653 }; |
| 645 | 654 |
| 646 } // namespace dart | 655 } // namespace dart |
| 647 | 656 |
| 648 #endif // VM_CONSTANTS_ARM_H_ | 657 #endif // VM_CONSTANTS_ARM_H_ |
| OLD | NEW |