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

Side by Side Diff: runtime/vm/stub_code_ia32.cc

Issue 200693002: Set VMTag from stubs when transitioning between Dart and Native (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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/stub_code_arm.cc ('k') | runtime/vm/stub_code_mips.cc » ('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 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
11 #include "vm/flow_graph_compiler.h" 11 #include "vm/flow_graph_compiler.h"
12 #include "vm/instructions.h" 12 #include "vm/instructions.h"
13 #include "vm/heap.h" 13 #include "vm/heap.h"
14 #include "vm/object_store.h" 14 #include "vm/object_store.h"
15 #include "vm/resolver.h" 15 #include "vm/resolver.h"
16 #include "vm/scavenger.h" 16 #include "vm/scavenger.h"
17 #include "vm/stack_frame.h" 17 #include "vm/stack_frame.h"
18 #include "vm/stub_code.h" 18 #include "vm/stub_code.h"
19 #include "vm/tags.h"
19 20
20 21
21 #define __ assembler-> 22 #define __ assembler->
22 23
23 namespace dart { 24 namespace dart {
24 25
25 DEFINE_FLAG(bool, inline_alloc, true, "Inline allocation of objects."); 26 DEFINE_FLAG(bool, inline_alloc, true, "Inline allocation of objects.");
26 DEFINE_FLAG(bool, use_slow_path, false, 27 DEFINE_FLAG(bool, use_slow_path, false,
27 "Set to true for debugging & verifying the slow paths."); 28 "Set to true for debugging & verifying the slow paths.");
28 DECLARE_FLAG(bool, trace_optimized_ic_calls); 29 DECLARE_FLAG(bool, trace_optimized_ic_calls);
(...skipping 21 matching lines...) Expand all
50 // Save exit frame information to enable stack walking as we are about 51 // Save exit frame information to enable stack walking as we are about
51 // to transition to Dart VM C++ code. 52 // to transition to Dart VM C++ code.
52 __ movl(Address(EAX, Isolate::top_exit_frame_info_offset()), ESP); 53 __ movl(Address(EAX, Isolate::top_exit_frame_info_offset()), ESP);
53 54
54 // Save current Context pointer into Isolate structure. 55 // Save current Context pointer into Isolate structure.
55 __ movl(Address(EAX, Isolate::top_context_offset()), CTX); 56 __ movl(Address(EAX, Isolate::top_context_offset()), CTX);
56 57
57 // Cache Isolate pointer into CTX while executing runtime code. 58 // Cache Isolate pointer into CTX while executing runtime code.
58 __ movl(CTX, EAX); 59 __ movl(CTX, EAX);
59 60
61 #if defined(DEBUG)
62 { Label ok;
63 // Check that we are always entering from Dart code.
64 __ movl(EAX, Address(CTX, Isolate::vm_tag_offset()));
65 __ cmpl(EAX, Immediate(VMTag::kScriptTagId));
66 __ j(EQUAL, &ok, Assembler::kNearJump);
67 __ Stop("Not coming from Dart code.");
68 __ Bind(&ok);
69 }
70 #endif
71
72 // Mark that the isolate is executing VM code.
73 __ movl(Address(CTX, Isolate::vm_tag_offset()), Immediate(VMTag::kVMTagId));
74
60 // Reserve space for arguments and align frame before entering C++ world. 75 // Reserve space for arguments and align frame before entering C++ world.
61 __ AddImmediate(ESP, Immediate(-sizeof(NativeArguments))); 76 __ AddImmediate(ESP, Immediate(-sizeof(NativeArguments)));
62 if (OS::ActivationFrameAlignment() > 1) { 77 if (OS::ActivationFrameAlignment() > 1) {
63 __ andl(ESP, Immediate(~(OS::ActivationFrameAlignment() - 1))); 78 __ andl(ESP, Immediate(~(OS::ActivationFrameAlignment() - 1)));
64 } 79 }
65 80
66 // Pass NativeArguments structure by value and call runtime. 81 // Pass NativeArguments structure by value and call runtime.
67 __ movl(Address(ESP, isolate_offset), CTX); // Set isolate in NativeArgs. 82 __ movl(Address(ESP, isolate_offset), CTX); // Set isolate in NativeArgs.
68 // There are no runtime calls to closures, so we do not need to set the tag 83 // There are no runtime calls to closures, so we do not need to set the tag
69 // bits kClosureFunctionBit and kInstanceFunctionBit in argc_tag_. 84 // bits kClosureFunctionBit and kInstanceFunctionBit in argc_tag_.
70 __ movl(Address(ESP, argc_tag_offset), EDX); // Set argc in NativeArguments. 85 __ movl(Address(ESP, argc_tag_offset), EDX); // Set argc in NativeArguments.
71 __ leal(EAX, Address(EBP, EDX, TIMES_4, 1 * kWordSize)); // Compute argv. 86 __ leal(EAX, Address(EBP, EDX, TIMES_4, 1 * kWordSize)); // Compute argv.
72 __ movl(Address(ESP, argv_offset), EAX); // Set argv in NativeArguments. 87 __ movl(Address(ESP, argv_offset), EAX); // Set argv in NativeArguments.
73 __ addl(EAX, Immediate(1 * kWordSize)); // Retval is next to 1st argument. 88 __ addl(EAX, Immediate(1 * kWordSize)); // Retval is next to 1st argument.
74 __ movl(Address(ESP, retval_offset), EAX); // Set retval in NativeArguments. 89 __ movl(Address(ESP, retval_offset), EAX); // Set retval in NativeArguments.
75 __ call(ECX); 90 __ call(ECX);
76 91
92 // Mark that the isolate is executing Dart code.
93 __ movl(Address(CTX, Isolate::vm_tag_offset()),
94 Immediate(VMTag::kScriptTagId));
95
77 // Reset exit frame information in Isolate structure. 96 // Reset exit frame information in Isolate structure.
78 __ movl(Address(CTX, Isolate::top_exit_frame_info_offset()), Immediate(0)); 97 __ movl(Address(CTX, Isolate::top_exit_frame_info_offset()), Immediate(0));
79 98
80 // Load Context pointer from Isolate structure into ECX. 99 // Load Context pointer from Isolate structure into ECX.
81 __ movl(ECX, Address(CTX, Isolate::top_context_offset())); 100 __ movl(ECX, Address(CTX, Isolate::top_context_offset()));
82 101
83 // Reset Context pointer in Isolate structure. 102 // Reset Context pointer in Isolate structure.
84 const Immediate& raw_null = 103 const Immediate& raw_null =
85 Immediate(reinterpret_cast<intptr_t>(Object::null())); 104 Immediate(reinterpret_cast<intptr_t>(Object::null()));
86 __ movl(Address(CTX, Isolate::top_context_offset()), raw_null); 105 __ movl(Address(CTX, Isolate::top_context_offset()), raw_null);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // Save exit frame information to enable stack walking as we are about 159 // Save exit frame information to enable stack walking as we are about
141 // to transition to dart VM code. 160 // to transition to dart VM code.
142 __ movl(Address(EDI, Isolate::top_exit_frame_info_offset()), ESP); 161 __ movl(Address(EDI, Isolate::top_exit_frame_info_offset()), ESP);
143 162
144 // Save current Context pointer into Isolate structure. 163 // Save current Context pointer into Isolate structure.
145 __ movl(Address(EDI, Isolate::top_context_offset()), CTX); 164 __ movl(Address(EDI, Isolate::top_context_offset()), CTX);
146 165
147 // Cache Isolate pointer into CTX while executing native code. 166 // Cache Isolate pointer into CTX while executing native code.
148 __ movl(CTX, EDI); 167 __ movl(CTX, EDI);
149 168
169 #if defined(DEBUG)
170 { Label ok;
171 // Check that we are always entering from Dart code.
172 __ movl(EDI, Address(CTX, Isolate::vm_tag_offset()));
173 __ cmpl(EDI, Immediate(VMTag::kScriptTagId));
174 __ j(EQUAL, &ok, Assembler::kNearJump);
175 __ Stop("Not coming from Dart code.");
176 __ Bind(&ok);
177 }
178 #endif
179
180 // Mark that the isolate is executing Native code.
181 __ movl(Address(CTX, Isolate::vm_tag_offset()),
182 Immediate(VMTag::kRuntimeNativeTagId));
183
150 // Reserve space for the native arguments structure, the outgoing parameters 184 // Reserve space for the native arguments structure, the outgoing parameters
151 // (pointer to the native arguments structure, the C function entry point) 185 // (pointer to the native arguments structure, the C function entry point)
152 // and align frame before entering the C++ world. 186 // and align frame before entering the C++ world.
153 __ AddImmediate(ESP, Immediate(-sizeof(NativeArguments) - (2 * kWordSize))); 187 __ AddImmediate(ESP, Immediate(-sizeof(NativeArguments) - (2 * kWordSize)));
154 if (OS::ActivationFrameAlignment() > 1) { 188 if (OS::ActivationFrameAlignment() > 1) {
155 __ andl(ESP, Immediate(~(OS::ActivationFrameAlignment() - 1))); 189 __ andl(ESP, Immediate(~(OS::ActivationFrameAlignment() - 1)));
156 } 190 }
157 191
158 // Pass NativeArguments structure by value and call native function. 192 // Pass NativeArguments structure by value and call native function.
159 __ movl(Address(ESP, isolate_offset), CTX); // Set isolate in NativeArgs. 193 __ movl(Address(ESP, isolate_offset), CTX); // Set isolate in NativeArgs.
160 __ movl(Address(ESP, argc_tag_offset), EDX); // Set argc in NativeArguments. 194 __ movl(Address(ESP, argc_tag_offset), EDX); // Set argc in NativeArguments.
161 __ movl(Address(ESP, argv_offset), EAX); // Set argv in NativeArguments. 195 __ movl(Address(ESP, argv_offset), EAX); // Set argv in NativeArguments.
162 __ leal(EAX, Address(EBP, 2 * kWordSize)); // Compute return value addr. 196 __ leal(EAX, Address(EBP, 2 * kWordSize)); // Compute return value addr.
163 __ movl(Address(ESP, retval_offset), EAX); // Set retval in NativeArguments. 197 __ movl(Address(ESP, retval_offset), EAX); // Set retval in NativeArguments.
164 __ leal(EAX, Address(ESP, 2 * kWordSize)); // Pointer to the NativeArguments. 198 __ leal(EAX, Address(ESP, 2 * kWordSize)); // Pointer to the NativeArguments.
165 __ movl(Address(ESP, 0), EAX); // Pass the pointer to the NativeArguments. 199 __ movl(Address(ESP, 0), EAX); // Pass the pointer to the NativeArguments.
166 200
167 // Call native function (setsup scope if not leaf function). 201 // Call native function (setsup scope if not leaf function).
168 Label leaf_call; 202 Label leaf_call;
169 Label done; 203 Label done;
170 __ testl(EDX, Immediate(NativeArguments::AutoSetupScopeMask())); 204 __ testl(EDX, Immediate(NativeArguments::AutoSetupScopeMask()));
171 __ j(ZERO, &leaf_call, Assembler::kNearJump); 205 __ j(ZERO, &leaf_call, Assembler::kNearJump);
172 __ movl(Address(ESP, kWordSize), ECX); // Function to call. 206 __ movl(Address(ESP, kWordSize), ECX); // Function to call.
173 __ call(&NativeEntry::NativeCallWrapperLabel()); 207 __ call(&NativeEntry::NativeCallWrapperLabel());
174 __ jmp(&done); 208 __ jmp(&done);
175 __ Bind(&leaf_call); 209 __ Bind(&leaf_call);
176 __ call(ECX); 210 __ call(ECX);
177 __ Bind(&done); 211 __ Bind(&done);
178 212
213 // Mark that the isolate is executing Dart code.
214 __ movl(Address(CTX, Isolate::vm_tag_offset()),
215 Immediate(VMTag::kScriptTagId));
216
179 // Reset exit frame information in Isolate structure. 217 // Reset exit frame information in Isolate structure.
180 __ movl(Address(CTX, Isolate::top_exit_frame_info_offset()), Immediate(0)); 218 __ movl(Address(CTX, Isolate::top_exit_frame_info_offset()), Immediate(0));
181 219
182 // Load Context pointer from Isolate structure into EDI. 220 // Load Context pointer from Isolate structure into EDI.
183 __ movl(EDI, Address(CTX, Isolate::top_context_offset())); 221 __ movl(EDI, Address(CTX, Isolate::top_context_offset()));
184 222
185 // Reset Context pointer in Isolate structure. 223 // Reset Context pointer in Isolate structure.
186 const Immediate& raw_null = 224 const Immediate& raw_null =
187 Immediate(reinterpret_cast<intptr_t>(Object::null())); 225 Immediate(reinterpret_cast<intptr_t>(Object::null()));
188 __ movl(Address(CTX, Isolate::top_context_offset()), raw_null); 226 __ movl(Address(CTX, Isolate::top_context_offset()), raw_null);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 // Save exit frame information to enable stack walking as we are about 259 // Save exit frame information to enable stack walking as we are about
222 // to transition to dart VM code. 260 // to transition to dart VM code.
223 __ movl(Address(EDI, Isolate::top_exit_frame_info_offset()), ESP); 261 __ movl(Address(EDI, Isolate::top_exit_frame_info_offset()), ESP);
224 262
225 // Save current Context pointer into Isolate structure. 263 // Save current Context pointer into Isolate structure.
226 __ movl(Address(EDI, Isolate::top_context_offset()), CTX); 264 __ movl(Address(EDI, Isolate::top_context_offset()), CTX);
227 265
228 // Cache Isolate pointer into CTX while executing native code. 266 // Cache Isolate pointer into CTX while executing native code.
229 __ movl(CTX, EDI); 267 __ movl(CTX, EDI);
230 268
269 #if defined(DEBUG)
270 { Label ok;
271 // Check that we are always entering from Dart code.
272 __ movl(EDI, Address(CTX, Isolate::vm_tag_offset()));
273 __ cmpl(EDI, Immediate(VMTag::kScriptTagId));
274 __ j(EQUAL, &ok, Assembler::kNearJump);
275 __ Stop("Not coming from Dart code.");
276 __ Bind(&ok);
277 }
278 #endif
279
280 // Mark that the isolate is executing Native code.
281 __ movl(Address(CTX, Isolate::vm_tag_offset()),
282 Immediate(VMTag::kRuntimeNativeTagId));
283
231 // Reserve space for the native arguments structure, the outgoing parameter 284 // Reserve space for the native arguments structure, the outgoing parameter
232 // (pointer to the native arguments structure) and align frame before 285 // (pointer to the native arguments structure) and align frame before
233 // entering the C++ world. 286 // entering the C++ world.
234 __ AddImmediate(ESP, Immediate(-sizeof(NativeArguments) - kWordSize)); 287 __ AddImmediate(ESP, Immediate(-sizeof(NativeArguments) - kWordSize));
235 if (OS::ActivationFrameAlignment() > 1) { 288 if (OS::ActivationFrameAlignment() > 1) {
236 __ andl(ESP, Immediate(~(OS::ActivationFrameAlignment() - 1))); 289 __ andl(ESP, Immediate(~(OS::ActivationFrameAlignment() - 1)));
237 } 290 }
238 291
239 // Pass NativeArguments structure by value and call native function. 292 // Pass NativeArguments structure by value and call native function.
240 __ movl(Address(ESP, isolate_offset), CTX); // Set isolate in NativeArgs. 293 __ movl(Address(ESP, isolate_offset), CTX); // Set isolate in NativeArgs.
241 __ movl(Address(ESP, argc_tag_offset), EDX); // Set argc in NativeArguments. 294 __ movl(Address(ESP, argc_tag_offset), EDX); // Set argc in NativeArguments.
242 __ movl(Address(ESP, argv_offset), EAX); // Set argv in NativeArguments. 295 __ movl(Address(ESP, argv_offset), EAX); // Set argv in NativeArguments.
243 __ leal(EAX, Address(EBP, 2 * kWordSize)); // Compute return value addr. 296 __ leal(EAX, Address(EBP, 2 * kWordSize)); // Compute return value addr.
244 __ movl(Address(ESP, retval_offset), EAX); // Set retval in NativeArguments. 297 __ movl(Address(ESP, retval_offset), EAX); // Set retval in NativeArguments.
245 __ leal(EAX, Address(ESP, kWordSize)); // Pointer to the NativeArguments. 298 __ leal(EAX, Address(ESP, kWordSize)); // Pointer to the NativeArguments.
246 __ movl(Address(ESP, 0), EAX); // Pass the pointer to the NativeArguments. 299 __ movl(Address(ESP, 0), EAX); // Pass the pointer to the NativeArguments.
247 __ call(ECX); 300 __ call(ECX);
248 301
302 // Mark that the isolate is executing Dart code.
303 __ movl(Address(CTX, Isolate::vm_tag_offset()),
304 Immediate(VMTag::kScriptTagId));
305
249 // Reset exit frame information in Isolate structure. 306 // Reset exit frame information in Isolate structure.
250 __ movl(Address(CTX, Isolate::top_exit_frame_info_offset()), Immediate(0)); 307 __ movl(Address(CTX, Isolate::top_exit_frame_info_offset()), Immediate(0));
251 308
252 // Load Context pointer from Isolate structure into EDI. 309 // Load Context pointer from Isolate structure into EDI.
253 __ movl(EDI, Address(CTX, Isolate::top_context_offset())); 310 __ movl(EDI, Address(CTX, Isolate::top_context_offset()));
254 311
255 // Reset Context pointer in Isolate structure. 312 // Reset Context pointer in Isolate structure.
256 const Immediate& raw_null = 313 const Immediate& raw_null =
257 Immediate(reinterpret_cast<intptr_t>(Object::null())); 314 Immediate(reinterpret_cast<intptr_t>(Object::null()));
258 __ movl(Address(CTX, Isolate::top_context_offset()), raw_null); 315 __ movl(Address(CTX, Isolate::top_context_offset()), raw_null);
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 // done. The assumption is that this register will never be clobbered by 865 // done. The assumption is that this register will never be clobbered by
809 // compiled or runtime stub code. 866 // compiled or runtime stub code.
810 867
811 // Cache the new Context pointer into CTX while executing dart code. 868 // Cache the new Context pointer into CTX while executing dart code.
812 __ movl(CTX, Address(EBP, kNewContextOffset)); 869 __ movl(CTX, Address(EBP, kNewContextOffset));
813 __ movl(CTX, Address(CTX, VMHandles::kOffsetOfRawPtrInHandle)); 870 __ movl(CTX, Address(CTX, VMHandles::kOffsetOfRawPtrInHandle));
814 871
815 // Load Isolate pointer from Context structure into EDI. 872 // Load Isolate pointer from Context structure into EDI.
816 __ movl(EDI, FieldAddress(CTX, Context::isolate_offset())); 873 __ movl(EDI, FieldAddress(CTX, Context::isolate_offset()));
817 874
875 // Save the current VMTag on the stack.
876 ASSERT(kSavedVMTagSlotFromEntryFp == -4);
877 __ movl(ECX, Address(EDI, Isolate::vm_tag_offset()));
878 __ pushl(ECX);
879
880 // Mark that the isolate is executing Dart code.
881 __ movl(Address(EDI, Isolate::vm_tag_offset()),
882 Immediate(VMTag::kScriptTagId));
883
818 // Save the top exit frame info. Use EDX as a temporary register. 884 // Save the top exit frame info. Use EDX as a temporary register.
819 // StackFrameIterator reads the top exit frame info saved in this frame. 885 // StackFrameIterator reads the top exit frame info saved in this frame.
820 // The constant kExitLinkSlotFromEntryFp must be kept in sync with the 886 // The constant kExitLinkSlotFromEntryFp must be kept in sync with the
821 // code below. 887 // code below.
822 ASSERT(kExitLinkSlotFromEntryFp == -4); 888 ASSERT(kExitLinkSlotFromEntryFp == -5);
823 __ movl(EDX, Address(EDI, Isolate::top_exit_frame_info_offset())); 889 __ movl(EDX, Address(EDI, Isolate::top_exit_frame_info_offset()));
824 __ pushl(EDX); 890 __ pushl(EDX);
825 __ movl(Address(EDI, Isolate::top_exit_frame_info_offset()), Immediate(0)); 891 __ movl(Address(EDI, Isolate::top_exit_frame_info_offset()), Immediate(0));
826 892
827 // Save the old Context pointer. Use ECX as a temporary register. 893 // Save the old Context pointer. Use ECX as a temporary register.
828 // Note that VisitObjectPointers will find this saved Context pointer during 894 // Note that VisitObjectPointers will find this saved Context pointer during
829 // GC marking, since it traverses any information between SP and 895 // GC marking, since it traverses any information between SP and
830 // FP - kExitLinkSlotFromEntryFp. 896 // FP - kExitLinkSlotFromEntryFp.
831 // EntryFrame::SavedContext reads the context saved in this frame. 897 // EntryFrame::SavedContext reads the context saved in this frame.
832 // The constant kSavedContextSlotFromEntryFp must be kept in sync with 898 // The constant kSavedContextSlotFromEntryFp must be kept in sync with
833 // the code below. 899 // the code below.
834 ASSERT(kSavedContextSlotFromEntryFp == -5); 900 ASSERT(kSavedContextSlotFromEntryFp == -6);
835 __ movl(ECX, Address(EDI, Isolate::top_context_offset())); 901 __ movl(ECX, Address(EDI, Isolate::top_context_offset()));
836 __ pushl(ECX); 902 __ pushl(ECX);
837 903
838 // Load arguments descriptor array into EDX. 904 // Load arguments descriptor array into EDX.
839 __ movl(EDX, Address(EBP, kArgumentsDescOffset)); 905 __ movl(EDX, Address(EBP, kArgumentsDescOffset));
840 __ movl(EDX, Address(EDX, VMHandles::kOffsetOfRawPtrInHandle)); 906 __ movl(EDX, Address(EDX, VMHandles::kOffsetOfRawPtrInHandle));
841 907
842 // Load number of arguments into EBX. 908 // Load number of arguments into EBX.
843 __ movl(EBX, FieldAddress(EDX, ArgumentsDescriptor::count_offset())); 909 __ movl(EBX, FieldAddress(EDX, ArgumentsDescriptor::count_offset()));
844 __ SmiUntag(EBX); 910 __ SmiUntag(EBX);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 // Restore the saved Context pointer into the Isolate structure. 950 // Restore the saved Context pointer into the Isolate structure.
885 // Uses ECX as a temporary register for this. 951 // Uses ECX as a temporary register for this.
886 __ popl(ECX); 952 __ popl(ECX);
887 __ movl(Address(CTX, Isolate::top_context_offset()), ECX); 953 __ movl(Address(CTX, Isolate::top_context_offset()), ECX);
888 954
889 // Restore the saved top exit frame info back into the Isolate structure. 955 // Restore the saved top exit frame info back into the Isolate structure.
890 // Uses EDX as a temporary register for this. 956 // Uses EDX as a temporary register for this.
891 __ popl(EDX); 957 __ popl(EDX);
892 __ movl(Address(CTX, Isolate::top_exit_frame_info_offset()), EDX); 958 __ movl(Address(CTX, Isolate::top_exit_frame_info_offset()), EDX);
893 959
960 // Restore the current VMTag from the stack.
961 __ popl(ECX);
962 __ movl(Address(CTX, Isolate::vm_tag_offset()), ECX);
963
894 // Restore C++ ABI callee-saved registers. 964 // Restore C++ ABI callee-saved registers.
895 __ popl(EDI); 965 __ popl(EDI);
896 __ popl(ESI); 966 __ popl(ESI);
897 __ popl(EBX); 967 __ popl(EBX);
898 968
899 // Restore the frame pointer. 969 // Restore the frame pointer.
900 __ LeaveFrame(); 970 __ LeaveFrame();
901 971
902 __ ret(); 972 __ ret();
903 } 973 }
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
1965 const Register temp = ECX; 2035 const Register temp = ECX;
1966 __ movl(left, Address(ESP, 2 * kWordSize)); 2036 __ movl(left, Address(ESP, 2 * kWordSize));
1967 __ movl(right, Address(ESP, 1 * kWordSize)); 2037 __ movl(right, Address(ESP, 1 * kWordSize));
1968 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); 2038 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp);
1969 __ ret(); 2039 __ ret();
1970 } 2040 }
1971 2041
1972 } // namespace dart 2042 } // namespace dart
1973 2043
1974 #endif // defined TARGET_ARCH_IA32 2044 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_arm.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698