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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 126 |
127 | 127 |
128 // Architecture independent aliases. | 128 // Architecture independent aliases. |
129 typedef DRegister FpuRegister; | 129 typedef DRegister FpuRegister; |
130 const FpuRegister FpuTMP = D0; | 130 const FpuRegister FpuTMP = D0; |
131 const int kNumberOfFpuRegisters = kNumberOfDRegisters; | 131 const int kNumberOfFpuRegisters = kNumberOfDRegisters; |
132 | 132 |
133 | 133 |
134 // Register aliases. | 134 // Register aliases. |
135 const Register TMP = kNoRegister; // No scratch register used by assembler. | 135 const Register TMP = kNoRegister; // No scratch register used by assembler. |
136 const Register CTX = R9; // Caches current context in generated code. | 136 const Register CTX = R9; // Caches current context in generated code. |
| 137 const Register CP = R10; // Caches constant pool base in generated code. |
137 const Register SPREG = SP; | 138 const Register SPREG = SP; |
138 const Register FPREG = FP; | 139 const Register FPREG = FP; |
139 | 140 |
140 | 141 |
141 // Exception object is passed in this register to the catch handlers when an | 142 // Exception object is passed in this register to the catch handlers when an |
142 // exception is thrown. | 143 // exception is thrown. |
143 const Register kExceptionObjectReg = R0; // Unimplemented. | 144 const Register kExceptionObjectReg = R0; // Unimplemented. |
144 | 145 |
145 | 146 |
| 147 // List of registers used in load/store multiple. |
| 148 typedef uint16_t RegList; |
| 149 const RegList kAllCoreRegistersList = 0xFFFF; |
| 150 |
| 151 |
| 152 // C++ ABI call registers |
| 153 const int kAbiRegisterCount = 4; |
| 154 const Register kAbiRegisters[kAbiRegisterCount] = { R0, R1, R2, R3 }; |
| 155 const RegList kAbiRegisterList = (1 << R0) | (1 << R1) | (1 << R2) | (1 << R3); |
| 156 |
| 157 |
146 // Values for the condition field as defined in section A3.2. | 158 // Values for the condition field as defined in section A3.2. |
147 enum Condition { | 159 enum Condition { |
148 kNoCondition = -1, | 160 kNoCondition = -1, |
149 EQ = 0, // equal | 161 EQ = 0, // equal |
150 NE = 1, // not equal | 162 NE = 1, // not equal |
151 CS = 2, // carry set/unsigned higher or same | 163 CS = 2, // carry set/unsigned higher or same |
152 CC = 3, // carry clear/unsigned lower | 164 CC = 3, // carry clear/unsigned lower |
153 MI = 4, // minus/negative | 165 MI = 4, // minus/negative |
154 PL = 5, // plus/positive or zero | 166 PL = 5, // plus/positive or zero |
155 VS = 6, // overflow | 167 VS = 6, // overflow |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 Instr* Next() { return this + kInstrSize; } | 498 Instr* Next() { return this + kInstrSize; } |
487 | 499 |
488 private: | 500 private: |
489 DISALLOW_ALLOCATION(); | 501 DISALLOW_ALLOCATION(); |
490 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); | 502 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); |
491 }; | 503 }; |
492 | 504 |
493 } // namespace dart | 505 } // namespace dart |
494 | 506 |
495 #endif // VM_CONSTANTS_ARM_H_ | 507 #endif // VM_CONSTANTS_ARM_H_ |
OLD | NEW |