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

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

Issue 10534105: Implement is32 LoadIndexed. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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/intermediate_language_x64.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) 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 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 Label receiver_not_smi; 818 Label receiver_not_smi;
819 __ Bind(&check_for_mint); 819 __ Bind(&check_for_mint);
820 __ movl(EAX, Address(ESP, + 2 * kWordSize)); // Receiver. 820 __ movl(EAX, Address(ESP, + 2 * kWordSize)); // Receiver.
821 __ testl(EAX, Immediate(kSmiTagMask)); 821 __ testl(EAX, Immediate(kSmiTagMask));
822 __ j(NOT_ZERO, &receiver_not_smi); 822 __ j(NOT_ZERO, &receiver_not_smi);
823 823
824 // Note that an instance of Mint never contains a value that can be 824 // Note that an instance of Mint never contains a value that can be
825 // represented by Smi. 825 // represented by Smi.
826 // Left is Smi, return false if right is Mint, otherwise fall through. 826 // Left is Smi, return false if right is Mint, otherwise fall through.
827 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // Right argument. 827 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // Right argument.
828 __ CompareClassId(EAX, kMint, EAX); 828 __ CompareClassId(EAX, kMint, EDI);
829 __ j(NOT_EQUAL, &fall_through); 829 __ j(NOT_EQUAL, &fall_through);
830 __ LoadObject(EAX, bool_false); // Smi == Mint -> false. 830 __ LoadObject(EAX, bool_false); // Smi == Mint -> false.
831 __ ret(); 831 __ ret();
832 832
833 __ Bind(&receiver_not_smi); 833 __ Bind(&receiver_not_smi);
834 // EAX:: receiver. 834 // EAX:: receiver.
835 __ CompareClassId(EAX, kMint, EAX); 835 __ CompareClassId(EAX, kMint, EDI);
836 __ j(NOT_EQUAL, &fall_through); 836 __ j(NOT_EQUAL, &fall_through);
837 // Receiver is Mint, return false if right is Smi. 837 // Receiver is Mint, return false if right is Smi.
838 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // Right argument. 838 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // Right argument.
839 __ testl(EAX, Immediate(kSmiTagMask)); 839 __ testl(EAX, Immediate(kSmiTagMask));
840 __ j(NOT_ZERO, &fall_through); 840 __ j(NOT_ZERO, &fall_through);
841 __ LoadObject(EAX, bool_false); // Smi == Mint -> false. 841 __ LoadObject(EAX, bool_false); // Smi == Mint -> false.
842 __ ret(); 842 __ ret();
843 // TODO(srdjan): Implement Mint == Mint comparison. 843 // TODO(srdjan): Implement Mint == Mint comparison.
844 844
845 __ Bind(&fall_through); 845 __ Bind(&fall_through);
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
1351 __ Bind(&is_true); 1351 __ Bind(&is_true);
1352 __ LoadObject(EAX, bool_true); 1352 __ LoadObject(EAX, bool_true);
1353 __ ret(); 1353 __ ret();
1354 return true; 1354 return true;
1355 } 1355 }
1356 1356
1357 #undef __ 1357 #undef __
1358 } // namespace dart 1358 } // namespace dart
1359 1359
1360 #endif // defined TARGET_ARCH_IA32 1360 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698