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

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

Issue 58003003: Impelments IfThenElse instruction for ARM and MIPS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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_arm.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | 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) 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 "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 4648 matching lines...) Expand 10 before | Expand all | Expand 10 after
4659 } 4659 }
4660 4660
4661 4661
4662 // Detect pattern when one value is zero and another is a power of 2. 4662 // Detect pattern when one value is zero and another is a power of 2.
4663 static bool IsPowerOfTwoKind(intptr_t v1, intptr_t v2) { 4663 static bool IsPowerOfTwoKind(intptr_t v1, intptr_t v2) {
4664 return (Utils::IsPowerOfTwo(v1) && (v2 == 0)) || 4664 return (Utils::IsPowerOfTwo(v1) && (v2 == 0)) ||
4665 (Utils::IsPowerOfTwo(v2) && (v1 == 0)); 4665 (Utils::IsPowerOfTwo(v2) && (v1 == 0));
4666 } 4666 }
4667 4667
4668 4668
4669 bool IfThenElseInstr::IsSupported() {
4670 return true;
4671 }
4672
4673
4674 bool IfThenElseInstr::Supports(ComparisonInstr* comparison, 4669 bool IfThenElseInstr::Supports(ComparisonInstr* comparison,
4675 Value* v1, 4670 Value* v1,
4676 Value* v2) { 4671 Value* v2) {
4677 if (!(comparison->IsStrictCompare() && 4672 if (!(comparison->IsStrictCompare() &&
4678 !comparison->AsStrictCompare()->needs_number_check()) && 4673 !comparison->AsStrictCompare()->needs_number_check()) &&
4679 !(comparison->IsEqualityCompare() && 4674 !(comparison->IsEqualityCompare() &&
4680 (comparison->AsEqualityCompare()->operation_cid() == kSmiCid))) { 4675 (comparison->AsEqualityCompare()->operation_cid() == kSmiCid))) {
4681 return false; 4676 return false;
4682 } 4677 }
4683 4678
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
4890 PcDescriptors::kOther, 4885 PcDescriptors::kOther,
4891 locs()); 4886 locs());
4892 __ Drop(2); // Discard type arguments and receiver. 4887 __ Drop(2); // Discard type arguments and receiver.
4893 } 4888 }
4894 4889
4895 } // namespace dart 4890 } // namespace dart
4896 4891
4897 #undef __ 4892 #undef __
4898 4893
4899 #endif // defined TARGET_ARCH_IA32 4894 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698