| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64_H_ | 5 #ifndef VM_CONSTANTS_ARM64_H_ |
| 6 #define VM_CONSTANTS_ARM64_H_ | 6 #define VM_CONSTANTS_ARM64_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 // Architecture independent aliases. | 103 // Architecture independent aliases. |
| 104 typedef VRegister FpuRegister; | 104 typedef VRegister FpuRegister; |
| 105 const FpuRegister FpuTMP = VTMP0; | 105 const FpuRegister FpuTMP = VTMP0; |
| 106 const int kNumberOfFpuRegisters = kNumberOfVRegisters; | 106 const int kNumberOfFpuRegisters = kNumberOfVRegisters; |
| 107 const FpuRegister kNoFpuRegister = kNoVRegister; | 107 const FpuRegister kNoFpuRegister = kNoVRegister; |
| 108 | 108 |
| 109 // Register aliases. | 109 // Register aliases. |
| 110 const Register TMP = R16; // Used as scratch register by assembler. | 110 const Register TMP = R16; // Used as scratch register by assembler. |
| 111 const Register TMP2 = R17; | 111 const Register TMP2 = R17; |
| 112 const Register CTX = R27; // Caches current context in generated code. | 112 const Register CTX = R28; // Caches current context in generated code. |
| 113 const Register PP = R26; // Caches object pool pointer in generated code. | 113 const Register PP = R27; // Caches object pool pointer in generated code. |
| 114 const Register SPREG = R31; // Stack pointer register. | 114 const Register SPREG = R31; // Stack pointer register. |
| 115 const Register FPREG = FP; // Frame pointer register. | 115 const Register FPREG = FP; // Frame pointer register. |
| 116 const Register ICREG = R5; // IC data register. | 116 const Register ICREG = R5; // IC data register. |
| 117 | 117 |
| 118 // Exception object is passed in this register to the catch handlers when an | 118 // Exception object is passed in this register to the catch handlers when an |
| 119 // exception is thrown. | 119 // exception is thrown. |
| 120 const Register kExceptionObjectReg = R0; | 120 const Register kExceptionObjectReg = R0; |
| 121 | 121 |
| 122 // Stack trace object is passed in this register to the catch handlers when | 122 // Stack trace object is passed in this register to the catch handlers when |
| 123 // an exception is thrown. | 123 // an exception is thrown. |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 RET = BR | B22, | 314 RET = BR | B22, |
| 315 }; | 315 }; |
| 316 | 316 |
| 317 enum LoadStoreRegOp { | 317 enum LoadStoreRegOp { |
| 318 LoadStoreRegMask = 0x3a000000, | 318 LoadStoreRegMask = 0x3a000000, |
| 319 LoadStoreRegFixed = LoadStoreFixed | B29 | B28, | 319 LoadStoreRegFixed = LoadStoreFixed | B29 | B28, |
| 320 STR = LoadStoreRegFixed, | 320 STR = LoadStoreRegFixed, |
| 321 LDR = LoadStoreRegFixed | B22, | 321 LDR = LoadStoreRegFixed | B22, |
| 322 }; | 322 }; |
| 323 | 323 |
| 324 // C3.3.5 |
| 325 enum LoadRegLiteralOp { |
| 326 LoadRegLiteralMask = 0x3b000000, |
| 327 LoadRegLiteralFixed = LoadStoreFixed | B28, |
| 328 LDRpc = LoadRegLiteralFixed, |
| 329 }; |
| 330 |
| 324 // C3.4.1 | 331 // C3.4.1 |
| 325 enum AddSubImmOp { | 332 enum AddSubImmOp { |
| 326 AddSubImmMask = 0x1f000000, | 333 AddSubImmMask = 0x1f000000, |
| 327 AddSubImmFixed = DPImmediateFixed | B24, | 334 AddSubImmFixed = DPImmediateFixed | B24, |
| 328 ADDI = AddSubImmFixed, | 335 ADDI = AddSubImmFixed, |
| 329 SUBI = AddSubImmFixed | B30, | 336 SUBI = AddSubImmFixed | B30, |
| 330 }; | 337 }; |
| 331 | 338 |
| 332 // C3.4.4 | 339 // C3.4.4 |
| 333 enum LogicalImmOp { | 340 enum LogicalImmOp { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 _V(DPSimd1) \ | 411 _V(DPSimd1) \ |
| 405 _V(DPSimd2) \ | 412 _V(DPSimd2) \ |
| 406 _V(CompareAndBranch) \ | 413 _V(CompareAndBranch) \ |
| 407 _V(ConditionalBranch) \ | 414 _V(ConditionalBranch) \ |
| 408 _V(ExceptionGen) \ | 415 _V(ExceptionGen) \ |
| 409 _V(System) \ | 416 _V(System) \ |
| 410 _V(TestAndBranch) \ | 417 _V(TestAndBranch) \ |
| 411 _V(UnconditionalBranch) \ | 418 _V(UnconditionalBranch) \ |
| 412 _V(UnconditionalBranchReg) \ | 419 _V(UnconditionalBranchReg) \ |
| 413 _V(LoadStoreReg) \ | 420 _V(LoadStoreReg) \ |
| 421 _V(LoadRegLiteral) \ |
| 414 _V(AddSubImm) \ | 422 _V(AddSubImm) \ |
| 415 _V(LogicalImm) \ | 423 _V(LogicalImm) \ |
| 416 _V(MoveWide) \ | 424 _V(MoveWide) \ |
| 417 _V(PCRel) \ | 425 _V(PCRel) \ |
| 418 _V(AddSubShiftExt) \ | 426 _V(AddSubShiftExt) \ |
| 419 _V(MiscDP2Source) \ | 427 _V(MiscDP2Source) \ |
| 420 _V(MiscDP3Source) \ | 428 _V(MiscDP3Source) \ |
| 421 _V(LogicalShift) \ | 429 _V(LogicalShift) \ |
| 422 | 430 |
| 423 | 431 |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } | 771 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } |
| 764 | 772 |
| 765 private: | 773 private: |
| 766 DISALLOW_ALLOCATION(); | 774 DISALLOW_ALLOCATION(); |
| 767 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); | 775 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); |
| 768 }; | 776 }; |
| 769 | 777 |
| 770 } // namespace dart | 778 } // namespace dart |
| 771 | 779 |
| 772 #endif // VM_CONSTANTS_ARM64_H_ | 780 #endif // VM_CONSTANTS_ARM64_H_ |
| OLD | NEW |