Chromium Code Reviews| 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 { |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 92 | 92 |
| 93 // Exception object is passed in this register to the catch handlers when an | 93 // Exception object is passed in this register to the catch handlers when an |
| 94 // exception is thrown. | 94 // exception is thrown. |
| 95 const Register kExceptionObjectReg = RAX; | 95 const Register kExceptionObjectReg = RAX; |
| 96 | 96 |
| 97 // Stack trace object is passed in this register to the catch handlers when | 97 // Stack trace object is passed in this register to the catch handlers when |
| 98 // an exception is thrown. | 98 // an exception is thrown. |
| 99 const Register kStackTraceObjectReg = RDX; | 99 const Register kStackTraceObjectReg = RDX; |
| 100 | 100 |
| 101 | 101 |
| 102 // TODO(regis): Move these constants to stack_frame_x64.h. | |
| 102 // Dart stack frame layout. | 103 // Dart stack frame layout. |
| 103 static const int kLastParamSlotIndex = 2; | 104 static const int kLastParamSlotIndex = 2; // From fp. |
| 104 static const int kFirstLocalSlotIndex = -2; | 105 static const int kFirstLocalSlotIndex = -2; // From fp. |
| 106 static const int kPcSlotIndexFromSp = -1; | |
|
srdjan
2013/05/03 17:16:18
Add an ASCII drawing explaining the constants.
regis
2013/05/03 18:34:12
Done.
| |
| 105 | 107 |
| 106 | 108 |
| 107 enum ScaleFactor { | 109 enum ScaleFactor { |
| 108 TIMES_1 = 0, | 110 TIMES_1 = 0, |
| 109 TIMES_2 = 1, | 111 TIMES_2 = 1, |
| 110 TIMES_4 = 2, | 112 TIMES_4 = 2, |
| 111 TIMES_8 = 3, | 113 TIMES_8 = 3, |
| 112 TIMES_16 = 4, | 114 TIMES_16 = 4, |
| 113 TIMES_HALF_WORD_SIZE = kWordSizeLog2 - 1 | 115 TIMES_HALF_WORD_SIZE = kWordSizeLog2 - 1 |
| 114 }; | 116 }; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 166 }; | 168 }; |
| 167 | 169 |
| 168 | 170 |
| 169 // The largest multibyte nop we will emit. This could go up to 15 if it | 171 // The largest multibyte nop we will emit. This could go up to 15 if it |
| 170 // becomes important to us. | 172 // becomes important to us. |
| 171 const int MAX_NOP_SIZE = 8; | 173 const int MAX_NOP_SIZE = 8; |
| 172 | 174 |
| 173 } // namespace dart | 175 } // namespace dart |
| 174 | 176 |
| 175 #endif // VM_CONSTANTS_X64_H_ | 177 #endif // VM_CONSTANTS_X64_H_ |
| OLD | NEW |