Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(507)

Side by Side Diff: runtime/vm/constants_ia32.h

Issue 14831004: Introduce architecture specific headers describing Dart stack frames. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/constants_arm.h ('k') | runtime/vm/constants_mips.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_IA32_H_ 5 #ifndef VM_CONSTANTS_IA32_H_
6 #define VM_CONSTANTS_IA32_H_ 6 #define VM_CONSTANTS_IA32_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 // Exception object is passed in this register to the catch handlers when an 69 // Exception object is passed in this register to the catch handlers when an
70 // exception is thrown. 70 // exception is thrown.
71 const Register kExceptionObjectReg = EAX; 71 const Register kExceptionObjectReg = EAX;
72 72
73 // Stack trace object is passed in this register to the catch handlers when 73 // Stack trace object is passed in this register to the catch handlers when
74 // an exception is thrown. 74 // an exception is thrown.
75 const Register kStackTraceObjectReg = EDX; 75 const Register kStackTraceObjectReg = EDX;
76 76
77 77
78 // TODO(regis): Move these constants to stack_frame_ia32.h.
79 // Dart stack frame layout.
80 static const int kLastParamSlotIndex = 2; // From fp.
81 static const int kFirstLocalSlotIndex = -2; // From fp.
82 static const int kPcSlotIndexFromSp = -1;
83
84 /* IA32 Dart Frame Layout
85
86 | | <- TOS
87 Callee frame | ... |
88 | current ret addr | (PC of current frame)
89 +-------------------+
90 Current frame | ... | <- ESP of current frame
91 | first local |
92 | PC Marker | (current frame's code entry)
93 | caller's EBP | <- EBP of current frame
94 | caller's ret addr | (PC of caller frame)
95 +-------------------+
96 Caller frame | last parameter |
97 | ... |
98 */
99
100
101 enum ScaleFactor { 78 enum ScaleFactor {
102 TIMES_1 = 0, 79 TIMES_1 = 0,
103 TIMES_2 = 1, 80 TIMES_2 = 1,
104 TIMES_4 = 2, 81 TIMES_4 = 2,
105 TIMES_8 = 3, 82 TIMES_8 = 3,
106 TIMES_16 = 4, 83 TIMES_16 = 4,
107 TIMES_HALF_WORD_SIZE = kWordSizeLog2 - 1 84 TIMES_HALF_WORD_SIZE = kWordSizeLog2 - 1
108 }; 85 };
109 86
110 87
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 }; 137 };
161 138
162 139
163 // The largest multibyte nop we will emit. This could go up to 15 if it 140 // The largest multibyte nop we will emit. This could go up to 15 if it
164 // becomes important to us. 141 // becomes important to us.
165 const int MAX_NOP_SIZE = 8; 142 const int MAX_NOP_SIZE = 8;
166 143
167 } // namespace dart 144 } // namespace dart
168 145
169 #endif // VM_CONSTANTS_IA32_H_ 146 #endif // VM_CONSTANTS_IA32_H_
OLDNEW
« no previous file with comments | « runtime/vm/constants_arm.h ('k') | runtime/vm/constants_mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698