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

Side by Side Diff: runtime/vm/intermediate_language_x64.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_mips.cc ('k') | no next file » | 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_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 } 138 }
139 139
140 140
141 // Detect pattern when one value is zero and another is a power of 2. 141 // Detect pattern when one value is zero and another is a power of 2.
142 static bool IsPowerOfTwoKind(intptr_t v1, intptr_t v2) { 142 static bool IsPowerOfTwoKind(intptr_t v1, intptr_t v2) {
143 return (Utils::IsPowerOfTwo(v1) && (v2 == 0)) || 143 return (Utils::IsPowerOfTwo(v1) && (v2 == 0)) ||
144 (Utils::IsPowerOfTwo(v2) && (v1 == 0)); 144 (Utils::IsPowerOfTwo(v2) && (v1 == 0));
145 } 145 }
146 146
147 147
148 bool IfThenElseInstr::IsSupported() {
149 return true;
150 }
151
152
153 bool IfThenElseInstr::Supports(ComparisonInstr* comparison, 148 bool IfThenElseInstr::Supports(ComparisonInstr* comparison,
154 Value* v1, 149 Value* v1,
155 Value* v2) { 150 Value* v2) {
156 if (!(comparison->IsStrictCompare() && 151 if (!(comparison->IsStrictCompare() &&
157 !comparison->AsStrictCompare()->needs_number_check()) && 152 !comparison->AsStrictCompare()->needs_number_check()) &&
158 !(comparison->IsEqualityCompare() && 153 !(comparison->IsEqualityCompare() &&
159 (comparison->AsEqualityCompare()->operation_cid() == kSmiCid))) { 154 (comparison->AsEqualityCompare()->operation_cid() == kSmiCid))) {
160 return false; 155 return false;
161 } 156 }
162 157
(...skipping 4360 matching lines...) Expand 10 before | Expand all | Expand 10 after
4523 PcDescriptors::kOther, 4518 PcDescriptors::kOther,
4524 locs()); 4519 locs());
4525 __ Drop(2); // Discard type arguments and receiver. 4520 __ Drop(2); // Discard type arguments and receiver.
4526 } 4521 }
4527 4522
4528 } // namespace dart 4523 } // namespace dart
4529 4524
4530 #undef __ 4525 #undef __
4531 4526
4532 #endif // defined TARGET_ARCH_X64 4527 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698