| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 | 175 |
| 176 // Registers available to Dart that are not preserved by runtime calls. | 176 // Registers available to Dart that are not preserved by runtime calls. |
| 177 const RegList kDartVolatileCpuRegs = | 177 const RegList kDartVolatileCpuRegs = |
| 178 kDartAvailableCpuRegs & ~kAbiPreservedCpuRegs; | 178 kDartAvailableCpuRegs & ~kAbiPreservedCpuRegs; |
| 179 const int kDartVolatileCpuRegCount = 4; | 179 const int kDartVolatileCpuRegCount = 4; |
| 180 const DRegister kDartFirstVolatileFpuReg = D0; | 180 const DRegister kDartFirstVolatileFpuReg = D0; |
| 181 const DRegister kDartLastVolatileFpuReg = D7; | 181 const DRegister kDartLastVolatileFpuReg = D7; |
| 182 const int kDartVolatileFpuRegCount = 8; | 182 const int kDartVolatileFpuRegCount = 8; |
| 183 | 183 |
| 184 | 184 |
| 185 // TODO(regis): Move these constants to stack_frame_arm.h. |
| 185 // Dart stack frame layout. | 186 // Dart stack frame layout. |
| 186 static const int kLastParamSlotIndex = 3; | 187 static const int kLastParamSlotIndex = 3; // From fp. |
| 187 static const int kFirstLocalSlotIndex = -2; | 188 static const int kFirstLocalSlotIndex = -2; // From fp. |
| 189 static const int kPcSlotIndexFromSp = -2; |
| 188 | 190 |
| 191 /* ARM Dart Frame Layout |
| 192 |
| 193 | | <- TOS |
| 194 Callee frame | ... | |
| 195 | current LR | (PC of current frame) |
| 196 | PC Marker | (callee's frame code entry) |
| 197 +-------------------+ |
| 198 Current frame | ... | <- SP of current frame |
| 199 | first local | |
| 200 | caller's PP | |
| 201 | caller's FP | <- FP of current frame |
| 202 | caller's LR | (PC of caller frame) |
| 203 | PC Marker | (current frame's code entry) |
| 204 +-------------------+ |
| 205 Caller frame | last parameter | |
| 206 | ... | |
| 207 */ |
| 189 | 208 |
| 190 // Values for the condition field as defined in section A3.2. | 209 // Values for the condition field as defined in section A3.2. |
| 191 enum Condition { | 210 enum Condition { |
| 192 kNoCondition = -1, | 211 kNoCondition = -1, |
| 193 EQ = 0, // equal | 212 EQ = 0, // equal |
| 194 NE = 1, // not equal | 213 NE = 1, // not equal |
| 195 CS = 2, // carry set/unsigned higher or same | 214 CS = 2, // carry set/unsigned higher or same |
| 196 CC = 3, // carry clear/unsigned lower | 215 CC = 3, // carry clear/unsigned lower |
| 197 MI = 4, // minus/negative | 216 MI = 4, // minus/negative |
| 198 PL = 5, // plus/positive or zero | 217 PL = 5, // plus/positive or zero |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } | 586 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } |
| 568 | 587 |
| 569 private: | 588 private: |
| 570 DISALLOW_ALLOCATION(); | 589 DISALLOW_ALLOCATION(); |
| 571 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); | 590 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); |
| 572 }; | 591 }; |
| 573 | 592 |
| 574 } // namespace dart | 593 } // namespace dart |
| 575 | 594 |
| 576 #endif // VM_CONSTANTS_ARM_H_ | 595 #endif // VM_CONSTANTS_ARM_H_ |
| OLD | NEW |