OLD | NEW |
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 Loading... |
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 2241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2897 } | 2899 } |
2898 } | 2900 } |
2899 // TODO(srdjan): Implement unary kSUB (negate) Mint. | 2901 // TODO(srdjan): Implement unary kSUB (negate) Mint. |
2900 CodeGenerator::VisitUnaryOpNode(node); | 2902 CodeGenerator::VisitUnaryOpNode(node); |
2901 } | 2903 } |
2902 | 2904 |
2903 | 2905 |
2904 } // namespace dart | 2906 } // namespace dart |
2905 | 2907 |
2906 #endif // defined TARGET_ARCH_IA32 | 2908 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |