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

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

Issue 10440082: Fix a bug in ia32 shift left , implemented more inlined binary operations in x64. (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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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" // Needed here to get TARGET_ARCH_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/opt_code_generator.h" 8 #include "vm/opt_code_generator.h"
9 9
10 #include "vm/assembler_macros.h" 10 #include "vm/assembler_macros.h"
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 VisitLoadTwo(node->left(), node->right(), EAX, ECX); 636 VisitLoadTwo(node->left(), node->right(), EAX, ECX);
637 if (!left_info.IsClass(smi_class_) || !right_info.IsClass(smi_class_)) { 637 if (!left_info.IsClass(smi_class_) || !right_info.IsClass(smi_class_)) {
638 // Check if both Smi. 638 // Check if both Smi.
639 __ movl(EBX, EAX); 639 __ movl(EBX, EAX);
640 __ orl(EBX, ECX); 640 __ orl(EBX, ECX);
641 __ testl(EBX, Immediate(kSmiTagMask)); 641 __ testl(EBX, Immediate(kSmiTagMask));
642 __ j(NOT_ZERO, deopt_blob->label()); 642 __ j(NOT_ZERO, deopt_blob->label());
643 PropagateBackLocalClass(node->left(), smi_class_); 643 PropagateBackLocalClass(node->left(), smi_class_);
644 PropagateBackLocalClass(node->right(), smi_class_); 644 PropagateBackLocalClass(node->right(), smi_class_);
645 } 645 }
646 __ cmpl(ECX, Immediate(0));
647 __ j(LESS, deopt_blob->label());
646 Immediate count_limit = Immediate(0x1F); 648 Immediate count_limit = Immediate(0x1F);
647 __ SmiUntag(ECX); 649 __ SmiUntag(ECX);
648 __ cmpl(ECX, count_limit); 650 __ cmpl(ECX, count_limit);
649 Label shift_count_ok; 651 Label shift_count_ok;
650 __ j(LESS_EQUAL, &shift_count_ok, Assembler::kNearJump); 652 __ j(LESS_EQUAL, &shift_count_ok, Assembler::kNearJump);
651 __ movl(ECX, count_limit); 653 __ movl(ECX, count_limit);
652 __ Bind(&shift_count_ok); 654 __ Bind(&shift_count_ok);
653 // Shift amount must be in ECX. 655 // Shift amount must be in ECX.
654 __ SmiUntag(EAX); // Value. 656 __ SmiUntag(EAX); // Value.
655 __ sarl(EAX, ECX); 657 __ sarl(EAX, ECX);
(...skipping 2245 matching lines...) Expand 10 before | Expand all | Expand 10 after
2901 } 2903 }
2902 } 2904 }
2903 // TODO(srdjan): Implement unary kSUB (negate) Mint. 2905 // TODO(srdjan): Implement unary kSUB (negate) Mint.
2904 CodeGenerator::VisitUnaryOpNode(node); 2906 CodeGenerator::VisitUnaryOpNode(node);
2905 } 2907 }
2906 2908
2907 2909
2908 } // namespace dart 2910 } // namespace dart
2909 2911
2910 #endif // defined TARGET_ARCH_IA32 2912 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698