| 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_X64_H_ | 5 #ifndef VM_CONSTANTS_X64_H_ |
| 6 #define VM_CONSTANTS_X64_H_ | 6 #define VM_CONSTANTS_X64_H_ |
| 7 | 7 |
| 8 namespace dart { | 8 namespace dart { |
| 9 | 9 |
| 10 enum Register { | 10 enum Register { |
| 11 kFirstFreeCpuRegister = 0, |
| 11 RAX = 0, | 12 RAX = 0, |
| 12 RCX = 1, | 13 RCX = 1, |
| 13 RDX = 2, | 14 RDX = 2, |
| 14 RBX = 3, | 15 RBX = 3, |
| 15 RSP = 4, | 16 RSP = 4, |
| 16 RBP = 5, | 17 RBP = 5, |
| 17 RSI = 6, | 18 RSI = 6, |
| 18 RDI = 7, | 19 RDI = 7, |
| 19 R8 = 8, | 20 R8 = 8, |
| 20 R9 = 9, | 21 R9 = 9, |
| 21 R10 = 10, | 22 R10 = 10, |
| 22 R11 = 11, | 23 R11 = 11, |
| 23 R12 = 12, | 24 R12 = 12, |
| 24 R13 = 13, | 25 R13 = 13, |
| 25 R14 = 14, | 26 R14 = 14, |
| 26 R15 = 15, | 27 R15 = 15, |
| 28 kLastFreeCpuRegister = 15, |
| 27 kNumberOfCpuRegisters = 16, | 29 kNumberOfCpuRegisters = 16, |
| 28 kNoRegister = -1 // Signals an illegal register. | 30 kNoRegister = -1 // Signals an illegal register. |
| 29 }; | 31 }; |
| 30 | 32 |
| 31 | 33 |
| 32 enum ByteRegister { | 34 enum ByteRegister { |
| 33 AL = 0, | 35 AL = 0, |
| 34 CL = 1, | 36 CL = 1, |
| 35 DL = 2, | 37 DL = 2, |
| 36 BL = 3, | 38 BL = 3, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 REX_X = 1 << 1, | 78 REX_X = 1 << 1, |
| 77 REX_R = 1 << 2, | 79 REX_R = 1 << 2, |
| 78 REX_W = 1 << 3, | 80 REX_W = 1 << 3, |
| 79 REX_PREFIX = 1 << 6 | 81 REX_PREFIX = 1 << 6 |
| 80 }; | 82 }; |
| 81 | 83 |
| 82 | 84 |
| 83 // Register aliases. | 85 // Register aliases. |
| 84 const Register TMP = R11; // Used as scratch register by the assembler. | 86 const Register TMP = R11; // Used as scratch register by the assembler. |
| 85 const Register CTX = R15; // Caches current context in generated code. | 87 const Register CTX = R15; // Caches current context in generated code. |
| 86 const Register SPREG = RSP; | 88 const Register PP = kNoRegister; // No object pool pointer. |
| 87 const Register FPREG = RBP; | 89 const Register SPREG = RSP; // Stack pointer register. |
| 90 const Register FPREG = RBP; // Frame pointer register. |
| 88 | 91 |
| 89 // Exception object is passed in this register to the catch handlers when an | 92 // Exception object is passed in this register to the catch handlers when an |
| 90 // exception is thrown. | 93 // exception is thrown. |
| 91 const Register kExceptionObjectReg = RAX; | 94 const Register kExceptionObjectReg = RAX; |
| 92 | 95 |
| 93 // Stack trace object is passed in this register to the catch handlers when | 96 // Stack trace object is passed in this register to the catch handlers when |
| 94 // an exception is thrown. | 97 // an exception is thrown. |
| 95 const Register kStackTraceObjectReg = RDX; | 98 const Register kStackTraceObjectReg = RDX; |
| 96 | 99 |
| 97 enum ScaleFactor { | 100 enum ScaleFactor { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 }; | 158 }; |
| 156 | 159 |
| 157 | 160 |
| 158 // The largest multibyte nop we will emit. This could go up to 15 if it | 161 // The largest multibyte nop we will emit. This could go up to 15 if it |
| 159 // becomes important to us. | 162 // becomes important to us. |
| 160 const int MAX_NOP_SIZE = 8; | 163 const int MAX_NOP_SIZE = 8; |
| 161 | 164 |
| 162 } // namespace dart | 165 } // namespace dart |
| 163 | 166 |
| 164 #endif // VM_CONSTANTS_X64_H_ | 167 #endif // VM_CONSTANTS_X64_H_ |
| OLD | NEW |