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

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

Issue 10450006: Implement some intrinsics on x64, fix a bug in ia32 intrinciscs (must return false if there is a fa… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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/instructions_x64.h ('k') | runtime/vm/intrinsifier_x64.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // The intrinsic code below is executed before a method has built its frame. 5 // The intrinsic code below is executed before a method has built its frame.
6 // The return address is on the stack and the arguments below it. 6 // The return address is on the stack and the arguments below it.
7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved. 7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved.
8 // Each intrinsification method returns true if the corresponding 8 // Each intrinsification method returns true if the corresponding
9 // Dart method was intrinsified. 9 // Dart method was intrinsified.
10 10
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 bool Intrinsifier::GrowableArray_setLength(Assembler* assembler) { 407 bool Intrinsifier::GrowableArray_setLength(Assembler* assembler) {
408 Label fall_through; 408 Label fall_through;
409 __ movl(EAX, Address(ESP, + 2 * kWordSize)); 409 __ movl(EAX, Address(ESP, + 2 * kWordSize));
410 __ movl(EBX, Address(ESP, + 1 * kWordSize)); 410 __ movl(EBX, Address(ESP, + 1 * kWordSize));
411 __ movl(EDI, FieldAddress(EAX, GrowableObjectArray::data_offset())); 411 __ movl(EDI, FieldAddress(EAX, GrowableObjectArray::data_offset()));
412 __ cmpl(EBX, FieldAddress(EDI, Array::length_offset())); 412 __ cmpl(EBX, FieldAddress(EDI, Array::length_offset()));
413 __ j(ABOVE, &fall_through, Assembler::kNearJump); 413 __ j(ABOVE, &fall_through, Assembler::kNearJump);
414 __ movl(FieldAddress(EAX, GrowableObjectArray::length_offset()), EBX); 414 __ movl(FieldAddress(EAX, GrowableObjectArray::length_offset()), EBX);
415 __ ret(); 415 __ ret();
416 __ Bind(&fall_through); 416 __ Bind(&fall_through);
417 return true; 417 return false;
418 } 418 }
419 419
420 420
421 // Set data of growable object array. 421 // Set data of growable object array.
422 // On stack: growable array (+2), data (+1), return-address (+0). 422 // On stack: growable array (+2), data (+1), return-address (+0).
423 bool Intrinsifier::GrowableArray_setData(Assembler* assembler) { 423 bool Intrinsifier::GrowableArray_setData(Assembler* assembler) {
424 if (FLAG_enable_type_checks) { 424 if (FLAG_enable_type_checks) {
425 return false; 425 return false;
426 } 426 }
427 __ movl(EAX, Address(ESP, + 2 * kWordSize)); 427 __ movl(EAX, Address(ESP, + 2 * kWordSize));
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 __ Bind(&is_true); 1293 __ Bind(&is_true);
1294 __ LoadObject(EAX, bool_true); 1294 __ LoadObject(EAX, bool_true);
1295 __ ret(); 1295 __ ret();
1296 return true; 1296 return true;
1297 } 1297 }
1298 1298
1299 #undef __ 1299 #undef __
1300 } // namespace dart 1300 } // namespace dart
1301 1301
1302 #endif // defined TARGET_ARCH_IA32 1302 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/instructions_x64.h ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698