| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 2517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2528 if (CanDeoptimize()) { | 2528 if (CanDeoptimize()) { |
| 2529 __ cmpl(right, Immediate(0)); | 2529 __ cmpl(right, Immediate(0)); |
| 2530 __ j(LESS, deopt); | 2530 __ j(LESS, deopt); |
| 2531 } | 2531 } |
| 2532 __ SmiUntag(right); | 2532 __ SmiUntag(right); |
| 2533 // sarl operation masks the count to 5 bits. | 2533 // sarl operation masks the count to 5 bits. |
| 2534 const intptr_t kCountLimit = 0x1F; | 2534 const intptr_t kCountLimit = 0x1F; |
| 2535 Range* right_range = this->right()->definition()->range(); | 2535 Range* right_range = this->right()->definition()->range(); |
| 2536 if ((right_range == NULL) || | 2536 if ((right_range == NULL) || |
| 2537 !right_range->IsWithin(RangeBoundary::kMinusInfinity, kCountLimit)) { | 2537 !right_range->IsWithin(RangeBoundary::kMinusInfinity, kCountLimit)) { |
| 2538 __ cmpl(right, Immediate(kCountLimit)); | 2538 __ cmpl(right, Immediate(kCountLimit)); |
| 2539 Label count_ok; | 2539 Label count_ok; |
| 2540 __ j(LESS, &count_ok, Assembler::kNearJump); | 2540 __ j(LESS, &count_ok, Assembler::kNearJump); |
| 2541 __ movl(right, Immediate(kCountLimit)); | 2541 __ movl(right, Immediate(kCountLimit)); |
| 2542 __ Bind(&count_ok); | 2542 __ Bind(&count_ok); |
| 2543 } | 2543 } |
| 2544 ASSERT(right == ECX); // Count must be in ECX | 2544 ASSERT(right == ECX); // Count must be in ECX |
| 2545 __ SmiUntag(left); | 2545 __ SmiUntag(left); |
| 2546 __ sarl(left, right); | 2546 __ sarl(left, right); |
| 2547 __ SmiTag(left); | 2547 __ SmiTag(left); |
| 2548 break; | 2548 break; |
| (...skipping 2188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4737 PcDescriptors::kOther, | 4737 PcDescriptors::kOther, |
| 4738 locs()); | 4738 locs()); |
| 4739 __ Drop(2); // Discard type arguments and receiver. | 4739 __ Drop(2); // Discard type arguments and receiver. |
| 4740 } | 4740 } |
| 4741 | 4741 |
| 4742 } // namespace dart | 4742 } // namespace dart |
| 4743 | 4743 |
| 4744 #undef __ | 4744 #undef __ |
| 4745 | 4745 |
| 4746 #endif // defined TARGET_ARCH_IA32 | 4746 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |