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. | |
103 // Dart stack frame layout. | |
104 static const int kLastParamSlotIndex = 2; // From fp. | |
105 static const int kFirstLocalSlotIndex = -2; // From fp. | |
106 static const int kPcSlotIndexFromSp = -1; | |
107 | |
108 /* X64 Dart Frame Layout | |
109 | |
110 | | <- TOS | |
111 Callee frame | ... | | |
112 | current ret addr | (PC of current frame) | |
113 +-------------------+ | |
114 Current frame | ... | <- RSP of current frame | |
115 | first local | | |
116 | PC Marker | (current frame's code entry) | |
117 | caller's RBP | <- RBP of current frame | |
118 | caller's ret addr | (PC of caller frame) | |
119 +-------------------+ | |
120 Caller frame | last parameter | | |
121 | ... | | |
122 */ | |
123 | |
124 | |
125 enum ScaleFactor { | 102 enum ScaleFactor { |
126 TIMES_1 = 0, | 103 TIMES_1 = 0, |
127 TIMES_2 = 1, | 104 TIMES_2 = 1, |
128 TIMES_4 = 2, | 105 TIMES_4 = 2, |
129 TIMES_8 = 3, | 106 TIMES_8 = 3, |
130 TIMES_16 = 4, | 107 TIMES_16 = 4, |
131 TIMES_HALF_WORD_SIZE = kWordSizeLog2 - 1 | 108 TIMES_HALF_WORD_SIZE = kWordSizeLog2 - 1 |
132 }; | 109 }; |
133 | 110 |
134 | 111 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 }; | 161 }; |
185 | 162 |
186 | 163 |
187 // The largest multibyte nop we will emit. This could go up to 15 if it | 164 // The largest multibyte nop we will emit. This could go up to 15 if it |
188 // becomes important to us. | 165 // becomes important to us. |
189 const int MAX_NOP_SIZE = 8; | 166 const int MAX_NOP_SIZE = 8; |
190 | 167 |
191 } // namespace dart | 168 } // namespace dart |
192 | 169 |
193 #endif // VM_CONSTANTS_X64_H_ | 170 #endif // VM_CONSTANTS_X64_H_ |
OLD | NEW |