| 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 namespace dart { | 8 namespace dart { |
| 9 | 9 |
| 10 // We support both VFPv3-D16 and VFPv3-D32 profiles, but currently only one at | 10 // We support both VFPv3-D16 and VFPv3-D32 profiles, but currently only one at |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // Exception object is passed in this register to the catch handlers when an | 144 // Exception object is passed in this register to the catch handlers when an |
| 145 // exception is thrown. | 145 // exception is thrown. |
| 146 const Register kExceptionObjectReg = R0; // Unimplemented. | 146 const Register kExceptionObjectReg = R0; // Unimplemented. |
| 147 | 147 |
| 148 | 148 |
| 149 // List of registers used in load/store multiple. | 149 // List of registers used in load/store multiple. |
| 150 typedef uint16_t RegList; | 150 typedef uint16_t RegList; |
| 151 const RegList kAllCpuRegistersList = 0xFFFF; | 151 const RegList kAllCpuRegistersList = 0xFFFF; |
| 152 | 152 |
| 153 | 153 |
| 154 // C++ ABI call registers | 154 // C++ ABI call registers. |
| 155 const RegList kAbiArgumentRegs = (1 << R0) | (1 << R1) | (1 << R2) | (1 << R3); | 155 const RegList kAbiArgumentCpuRegs = |
| 156 const RegList kAbiPreservedRegs = (1 << R4) | (1 << R5) | (1 << R6) | | 156 (1 << R0) | (1 << R1) | (1 << R2) | (1 << R3); |
| 157 (1 << R7) | (1 << R8) | (1 << R9) | (1 << 10); | 157 const RegList kAbiPreservedCpuRegs = |
| 158 const int kAbiPreservedRegCount = 7; | 158 (1 << R4) | (1 << R5) | (1 << R6) | (1 << R7) | |
| 159 (1 << R8) | (1 << R9) | (1 << R10); |
| 160 const int kAbiPreservedCpuRegCount = 7; |
| 161 const DRegister kAbiFirstPreservedFpuReg = D8; |
| 162 const DRegister kAbiLastPreservedFpuReg = |
| 163 static_cast<DRegister>(kNumberOfDRegisters - 1); |
| 164 |
| 165 // CPU registers available to Dart allocator. |
| 166 const RegList kDartAvailableCpuRegs = |
| 167 (1 << R0) | (1 << R1) | (1 << R2) | (1 << R3) | |
| 168 (1 << R4) | (1 << R5) | (1 << R6) | (1 << R7) | (1 << R8); |
| 169 |
| 170 // Registers available to Dart that are not preserved by runtime calls. |
| 171 const RegList kDartVolatileCpuRegs = |
| 172 kDartAvailableCpuRegs & ~kAbiPreservedCpuRegs; |
| 173 const int kDartVolatileCpuRegCount = 4; |
| 174 const DRegister kDartFirstVolatileFpuReg = D0; |
| 175 const DRegister kDartLastVolatileFpuReg = D7; |
| 176 const int kDartVolatileFpuRegCount = 8; |
| 159 | 177 |
| 160 | 178 |
| 161 // Values for the condition field as defined in section A3.2. | 179 // Values for the condition field as defined in section A3.2. |
| 162 enum Condition { | 180 enum Condition { |
| 163 kNoCondition = -1, | 181 kNoCondition = -1, |
| 164 EQ = 0, // equal | 182 EQ = 0, // equal |
| 165 NE = 1, // not equal | 183 NE = 1, // not equal |
| 166 CS = 2, // carry set/unsigned higher or same | 184 CS = 2, // carry set/unsigned higher or same |
| 167 CC = 3, // carry clear/unsigned lower | 185 CC = 3, // carry clear/unsigned lower |
| 168 MI = 4, // minus/negative | 186 MI = 4, // minus/negative |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 Instr* Next() { return this + kInstrSize; } | 529 Instr* Next() { return this + kInstrSize; } |
| 512 | 530 |
| 513 private: | 531 private: |
| 514 DISALLOW_ALLOCATION(); | 532 DISALLOW_ALLOCATION(); |
| 515 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); | 533 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); |
| 516 }; | 534 }; |
| 517 | 535 |
| 518 } // namespace dart | 536 } // namespace dart |
| 519 | 537 |
| 520 #endif // VM_CONSTANTS_ARM_H_ | 538 #endif // VM_CONSTANTS_ARM_H_ |
| OLD | NEW |