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

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

Issue 303303002: Address TODOs and remove obsolete ones. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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) 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 ASSERT(argc_tag_offset == 1 * kWordSize); 194 ASSERT(argc_tag_offset == 1 * kWordSize);
195 // Set argc in NativeArguments: R1 already contains argc. 195 // Set argc in NativeArguments: R1 already contains argc.
196 196
197 ASSERT(argv_offset == 2 * kWordSize); 197 ASSERT(argv_offset == 2 * kWordSize);
198 // Set argv in NativeArguments: R2 already contains argv. 198 // Set argv in NativeArguments: R2 already contains argv.
199 199
200 // Set retval in NativeArgs. 200 // Set retval in NativeArgs.
201 ASSERT(retval_offset == 3 * kWordSize); 201 ASSERT(retval_offset == 3 * kWordSize);
202 __ AddImmediate(R3, FP, 2 * kWordSize, kNoPP); 202 __ AddImmediate(R3, FP, 2 * kWordSize, kNoPP);
203 203
204 // TODO(regis): Should we pass the structure by value as in runtime calls? 204 // Passing the structure by value as in runtime calls would require changing
205 // It would require changing Dart API for native functions. 205 // Dart API for native functions.
206 // For now, space is reserved on the stack and we pass a pointer to it. 206 // For now, space is reserved on the stack and we pass a pointer to it.
207 __ StoreToOffset(R0, SP, isolate_offset, kNoPP); 207 __ StoreToOffset(R0, SP, isolate_offset, kNoPP);
208 __ StoreToOffset(R1, SP, argc_tag_offset, kNoPP); 208 __ StoreToOffset(R1, SP, argc_tag_offset, kNoPP);
209 __ StoreToOffset(R2, SP, argv_offset, kNoPP); 209 __ StoreToOffset(R2, SP, argv_offset, kNoPP);
210 __ StoreToOffset(R3, SP, retval_offset, kNoPP); 210 __ StoreToOffset(R3, SP, retval_offset, kNoPP);
211 __ mov(R0, SP); // Pass the pointer to the NativeArguments. 211 __ mov(R0, SP); // Pass the pointer to the NativeArguments.
212 212
213 // Call native function (setsup scope if not leaf function). 213 // Call native function (setsup scope if not leaf function).
214 Label leaf_call; 214 Label leaf_call;
215 Label done; 215 Label done;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 ASSERT(argc_tag_offset == 1 * kWordSize); 315 ASSERT(argc_tag_offset == 1 * kWordSize);
316 // Set argc in NativeArguments: R1 already contains argc. 316 // Set argc in NativeArguments: R1 already contains argc.
317 317
318 ASSERT(argv_offset == 2 * kWordSize); 318 ASSERT(argv_offset == 2 * kWordSize);
319 // Set argv in NativeArguments: R2 already contains argv. 319 // Set argv in NativeArguments: R2 already contains argv.
320 320
321 // Set retval in NativeArgs. 321 // Set retval in NativeArgs.
322 ASSERT(retval_offset == 3 * kWordSize); 322 ASSERT(retval_offset == 3 * kWordSize);
323 __ AddImmediate(R3, FP, 2 * kWordSize, kNoPP); 323 __ AddImmediate(R3, FP, 2 * kWordSize, kNoPP);
324 324
325 // TODO(regis): Should we pass the structure by value as in runtime calls? 325 // Passing the structure by value as in runtime calls would require changing
326 // It would require changing Dart API for native functions. 326 // Dart API for native functions.
327 // For now, space is reserved on the stack and we pass a pointer to it. 327 // For now, space is reserved on the stack and we pass a pointer to it.
328 __ StoreToOffset(R0, SP, isolate_offset, kNoPP); 328 __ StoreToOffset(R0, SP, isolate_offset, kNoPP);
329 __ StoreToOffset(R1, SP, argc_tag_offset, kNoPP); 329 __ StoreToOffset(R1, SP, argc_tag_offset, kNoPP);
330 __ StoreToOffset(R2, SP, argv_offset, kNoPP); 330 __ StoreToOffset(R2, SP, argv_offset, kNoPP);
331 __ StoreToOffset(R3, SP, retval_offset, kNoPP); 331 __ StoreToOffset(R3, SP, retval_offset, kNoPP);
332 __ mov(R0, SP); // Pass the pointer to the NativeArguments. 332 __ mov(R0, SP); // Pass the pointer to the NativeArguments.
333 333
334 // Call native function or redirection via simulator. 334 // Call native function or redirection via simulator.
335 __ blr(R5); 335 __ blr(R5);
336 336
(...skipping 1587 matching lines...) Expand 10 before | Expand all | Expand 10 after
1924 const Register right = R0; 1924 const Register right = R0;
1925 __ LoadFromOffset(left, SP, 1 * kWordSize, kNoPP); 1925 __ LoadFromOffset(left, SP, 1 * kWordSize, kNoPP);
1926 __ LoadFromOffset(right, SP, 0 * kWordSize, kNoPP); 1926 __ LoadFromOffset(right, SP, 0 * kWordSize, kNoPP);
1927 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); 1927 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp);
1928 __ ret(); 1928 __ ret();
1929 } 1929 }
1930 1930
1931 } // namespace dart 1931 } // namespace dart
1932 1932
1933 #endif // defined TARGET_ARCH_ARM64 1933 #endif // defined TARGET_ARCH_ARM64
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