| 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 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 (kind == Token::kBIT_AND) || | 650 (kind == Token::kBIT_AND) || |
| 651 (kind == Token::kBIT_OR) || | 651 (kind == Token::kBIT_OR) || |
| 652 (kind == Token::kBIT_XOR)) { | 652 (kind == Token::kBIT_XOR)) { |
| 653 TraceOpt(node, kOptMessage); | 653 TraceOpt(node, kOptMessage); |
| 654 CodeGenInfo left_info(node->left()); | 654 CodeGenInfo left_info(node->left()); |
| 655 CodeGenInfo right_info(node->right()); | 655 CodeGenInfo right_info(node->right()); |
| 656 VisitLoadTwo(node->left(), node->right(), EAX, EDX); | 656 VisitLoadTwo(node->left(), node->right(), EAX, EDX); |
| 657 Label* overflow_label = NULL; | 657 Label* overflow_label = NULL; |
| 658 Label two_smis, call_operator; | 658 Label two_smis, call_operator; |
| 659 if (left_info.IsClass(smi_class_) || right_info.IsClass(smi_class_)) { | 659 if (left_info.IsClass(smi_class_) || right_info.IsClass(smi_class_)) { |
| 660 DeoptimizationBlob* deopt_blob = AddDeoptimizationBlob(node, EAX, EDX); | 660 DeoptimizationBlob* deopt_blob = AddDeoptimizationBlob(node, ECX, EDX); |
| 661 overflow_label = deopt_blob->label(); | 661 overflow_label = deopt_blob->label(); |
| 662 __ movl(ECX, EAX); // Save if overflow (needs original value). | 662 __ movl(ECX, EAX); // Save if overflow (needs original value). |
| 663 if (!left_info.IsClass(smi_class_) || !right_info.IsClass(smi_class_)) { | 663 if (!left_info.IsClass(smi_class_) || !right_info.IsClass(smi_class_)) { |
| 664 Register test_reg = left_info.IsClass(smi_class_) ? EDX : EAX; | 664 Register test_reg = left_info.IsClass(smi_class_) ? EDX : EAX; |
| 665 __ testl(test_reg, Immediate(kSmiTagMask)); | 665 __ testl(test_reg, Immediate(kSmiTagMask)); |
| 666 __ j(NOT_ZERO, deopt_blob->label()); | 666 __ j(NOT_ZERO, deopt_blob->label()); |
| 667 } | 667 } |
| 668 if (node->info() != NULL) { | 668 if (node->info() != NULL) { |
| 669 node->info()->set_is_class(&smi_class_); | 669 node->info()->set_is_class(&smi_class_); |
| 670 } | 670 } |
| (...skipping 1600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2271 __ addl(ESP, Immediate(node->arguments()->length() * kWordSize)); | 2271 __ addl(ESP, Immediate(node->arguments()->length() * kWordSize)); |
| 2272 // Result is in EAX. | 2272 // Result is in EAX. |
| 2273 if (IsResultNeeded(node)) { | 2273 if (IsResultNeeded(node)) { |
| 2274 __ pushl(EAX); | 2274 __ pushl(EAX); |
| 2275 } | 2275 } |
| 2276 } | 2276 } |
| 2277 | 2277 |
| 2278 } // namespace dart | 2278 } // namespace dart |
| 2279 | 2279 |
| 2280 #endif // defined TARGET_ARCH_IA32 | 2280 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |