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

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

Issue 264753002: Adds Simulator Longjmp and enables many tests for arm64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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/stack_frame_test.cc ('k') | no next file » | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 const intptr_t argv_offset = NativeArguments::argv_offset(); 145 const intptr_t argv_offset = NativeArguments::argv_offset();
146 const intptr_t retval_offset = NativeArguments::retval_offset(); 146 const intptr_t retval_offset = NativeArguments::retval_offset();
147 147
148 __ EnterFrame(0); 148 __ EnterFrame(0);
149 149
150 // Load current Isolate pointer from Context structure into R0. 150 // Load current Isolate pointer from Context structure into R0.
151 __ LoadFieldFromOffset(R0, CTX, Context::isolate_offset()); 151 __ LoadFieldFromOffset(R0, CTX, Context::isolate_offset());
152 152
153 // Save exit frame information to enable stack walking as we are about 153 // Save exit frame information to enable stack walking as we are about
154 // to transition to native code. 154 // to transition to native code.
155 __ StoreToOffset(SP, R0, Isolate::top_exit_frame_info_offset()); 155 __ mov(TMP, SP);
156 __ StoreToOffset(TMP, R0, Isolate::top_exit_frame_info_offset());
156 157
157 // Save current Context pointer into Isolate structure. 158 // Save current Context pointer into Isolate structure.
158 __ StoreToOffset(CTX, R0, Isolate::top_context_offset()); 159 __ StoreToOffset(CTX, R0, Isolate::top_context_offset());
159 160
160 // Cache Isolate pointer into CTX while executing native code. 161 // Cache Isolate pointer into CTX while executing native code.
161 __ mov(CTX, R0); 162 __ mov(CTX, R0);
162 163
163 #if defined(DEBUG) 164 #if defined(DEBUG)
164 { Label ok; 165 { Label ok;
165 // Check that we are always entering from Dart code. 166 // Check that we are always entering from Dart code.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 // Call native function or redirection via simulator. 230 // Call native function or redirection via simulator.
230 __ blr(R5); 231 __ blr(R5);
231 232
232 __ Bind(&done); 233 __ Bind(&done);
233 234
234 // Mark that the isolate is executing Dart code. 235 // Mark that the isolate is executing Dart code.
235 __ LoadImmediate(R2, VMTag::kScriptTagId, kNoPP); 236 __ LoadImmediate(R2, VMTag::kScriptTagId, kNoPP);
236 __ StoreToOffset(R2, CTX, Isolate::vm_tag_offset()); 237 __ StoreToOffset(R2, CTX, Isolate::vm_tag_offset());
237 238
238 // Reset exit frame information in Isolate structure. 239 // Reset exit frame information in Isolate structure.
239 __ LoadImmediate(R2, 0, kNoPP); 240 __ StoreToOffset(ZR, CTX, Isolate::top_exit_frame_info_offset());
240 __ StoreToOffset(R2, CTX, Isolate::top_exit_frame_info_offset());
241 241
242 // Load Context pointer from Isolate structure into R2. 242 // Load Context pointer from Isolate structure into R2.
243 __ LoadFromOffset(R2, CTX, Isolate::top_context_offset()); 243 __ LoadFromOffset(R2, CTX, Isolate::top_context_offset());
244 244
245 // Reset Context pointer in Isolate structure. 245 // Reset Context pointer in Isolate structure.
246 __ LoadObject(R3, Object::null_object(), PP); 246 __ LoadObject(R3, Object::null_object(), PP);
247 __ StoreToOffset(R3, CTX, Isolate::top_context_offset()); 247 __ StoreToOffset(R3, CTX, Isolate::top_context_offset());
248 248
249 // Cache Context pointer into CTX while executing Dart code. 249 // Cache Context pointer into CTX while executing Dart code.
250 __ mov(CTX, R2); 250 __ mov(CTX, R2);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 __ mov(R0, SP); // Pass the pointer to the NativeArguments. 329 __ mov(R0, SP); // Pass the pointer to the NativeArguments.
330 330
331 // Call native function or redirection via simulator. 331 // Call native function or redirection via simulator.
332 __ blr(R5); 332 __ blr(R5);
333 333
334 // Mark that the isolate is executing Dart code. 334 // Mark that the isolate is executing Dart code.
335 __ LoadImmediate(R2, VMTag::kScriptTagId, kNoPP); 335 __ LoadImmediate(R2, VMTag::kScriptTagId, kNoPP);
336 __ StoreToOffset(R2, CTX, Isolate::vm_tag_offset()); 336 __ StoreToOffset(R2, CTX, Isolate::vm_tag_offset());
337 337
338 // Reset exit frame information in Isolate structure. 338 // Reset exit frame information in Isolate structure.
339 __ LoadImmediate(R2, 0, kNoPP); 339 __ StoreToOffset(ZR, CTX, Isolate::top_exit_frame_info_offset());
340 __ StoreToOffset(R2, CTX, Isolate::top_exit_frame_info_offset());
341 340
342 // Load Context pointer from Isolate structure into R2. 341 // Load Context pointer from Isolate structure into R2.
343 __ LoadFromOffset(R2, CTX, Isolate::top_context_offset()); 342 __ LoadFromOffset(R2, CTX, Isolate::top_context_offset());
344 343
345 // Reset Context pointer in Isolate structure. 344 // Reset Context pointer in Isolate structure.
346 __ LoadObject(R3, Object::null_object(), PP); 345 __ LoadObject(R3, Object::null_object(), PP);
347 __ StoreToOffset(R3, CTX, Isolate::top_context_offset()); 346 __ StoreToOffset(R3, CTX, Isolate::top_context_offset());
348 347
349 // Cache Context pointer into CTX while executing Dart code. 348 // Cache Context pointer into CTX while executing Dart code.
350 __ mov(CTX, R2); 349 __ mov(CTX, R2);
(...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1592 1591
1593 1592
1594 void StubCode::GenerateOptimizedIdenticalWithNumberCheckStub( 1593 void StubCode::GenerateOptimizedIdenticalWithNumberCheckStub(
1595 Assembler* assembler) { 1594 Assembler* assembler) {
1596 __ Stop("GenerateOptimizedIdenticalWithNumberCheckStub"); 1595 __ Stop("GenerateOptimizedIdenticalWithNumberCheckStub");
1597 } 1596 }
1598 1597
1599 } // namespace dart 1598 } // namespace dart
1600 1599
1601 #endif // defined TARGET_ARCH_ARM64 1600 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/stack_frame_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698