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

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

Issue 11019011: Cleaning up in VM number hierarchy which was exposing a bunch (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove formatting changes Created 8 years, 2 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/intrinsifier_arm.cc ('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 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 // cannot tag the result. 716 // cannot tag the result.
717 __ cmpl(EAX, Immediate(0x40000000)); 717 __ cmpl(EAX, Immediate(0x40000000));
718 __ j(EQUAL, &fall_through); 718 __ j(EQUAL, &fall_through);
719 __ SmiTag(EAX); 719 __ SmiTag(EAX);
720 __ ret(); 720 __ ret();
721 __ Bind(&fall_through); 721 __ Bind(&fall_through);
722 return false; 722 return false;
723 } 723 }
724 724
725 725
726 bool Intrinsifier::Integer_negate(Assembler* assembler) {
727 Label fall_through;
728 __ movl(EAX, Address(ESP, + 1 * kWordSize));
729 __ testl(EAX, Immediate(kSmiTagMask));
730 __ j(NOT_ZERO, &fall_through, Assembler::kNearJump); // Non-smi value.
731 __ negl(EAX);
732 __ j(OVERFLOW, &fall_through, Assembler::kNearJump);
733 // Result is in EAX.
734 __ ret();
735 __ Bind(&fall_through);
736 return false;
737 }
srdjan 2012/10/01 16:16:36 Why eliminate negate intrinsification? I will rest
738
739
740 bool Intrinsifier::Integer_bitAndFromInteger(Assembler* assembler) { 726 bool Intrinsifier::Integer_bitAndFromInteger(Assembler* assembler) {
741 Label fall_through; 727 Label fall_through;
742 TestBothArgumentsSmis(assembler, &fall_through); 728 TestBothArgumentsSmis(assembler, &fall_through);
743 __ movl(EBX, Address(ESP, + 2 * kWordSize)); 729 __ movl(EBX, Address(ESP, + 2 * kWordSize));
744 __ andl(EAX, EBX); 730 __ andl(EAX, EBX);
745 // Result is in EAX. 731 // Result is in EAX.
746 __ ret(); 732 __ ret();
747 __ Bind(&fall_through); 733 __ Bind(&fall_through);
748 return false; 734 return false;
749 } 735 }
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1461 __ Bind(&is_true); 1447 __ Bind(&is_true);
1462 __ LoadObject(EAX, bool_true); 1448 __ LoadObject(EAX, bool_true);
1463 __ ret(); 1449 __ ret();
1464 return true; 1450 return true;
1465 } 1451 }
1466 1452
1467 #undef __ 1453 #undef __
1468 } // namespace dart 1454 } // namespace dart
1469 1455
1470 #endif // defined TARGET_ARCH_IA32 1456 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698