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

Side by Side Diff: src/compiler/instruction-selector-impl.h

Issue 436593002: [turbofan] Add Int32AddWithOverflow machine operator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add more tests. Created 6 years, 4 months 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 | « src/compiler/instruction-selector.cc ('k') | src/compiler/machine-node-factory.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 5 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
7 7
8 #include "src/compiler/instruction.h" 8 #include "src/compiler/instruction.h"
9 #include "src/compiler/instruction-selector.h" 9 #include "src/compiler/instruction-selector.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 ASSERT(IsBranch()); 249 ASSERT(IsBranch());
250 return false_block_; 250 return false_block_;
251 } 251 }
252 252
253 void Negate() { condition_ = static_cast<FlagsCondition>(condition_ ^ 1); } 253 void Negate() { condition_ = static_cast<FlagsCondition>(condition_ ^ 1); }
254 254
255 void Commute() { 255 void Commute() {
256 switch (condition_) { 256 switch (condition_) {
257 case kEqual: 257 case kEqual:
258 case kNotEqual: 258 case kNotEqual:
259 case kOverflow:
260 case kNotOverflow:
259 return; 261 return;
260 case kSignedLessThan: 262 case kSignedLessThan:
261 condition_ = kSignedGreaterThan; 263 condition_ = kSignedGreaterThan;
262 return; 264 return;
263 case kSignedGreaterThanOrEqual: 265 case kSignedGreaterThanOrEqual:
264 condition_ = kSignedLessThanOrEqual; 266 condition_ = kSignedLessThanOrEqual;
265 return; 267 return;
266 case kSignedLessThanOrEqual: 268 case kSignedLessThanOrEqual:
267 condition_ = kSignedGreaterThanOrEqual; 269 condition_ = kSignedGreaterThanOrEqual;
268 return; 270 return;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 int control_count() { return descriptor->CanLazilyDeoptimize() ? 2 : 0; } 345 int control_count() { return descriptor->CanLazilyDeoptimize() ? 2 : 0; }
344 346
345 int fixed_and_control_count() { return fixed_count + control_count(); } 347 int fixed_and_control_count() { return fixed_count + control_count(); }
346 }; 348 };
347 349
348 } // namespace compiler 350 } // namespace compiler
349 } // namespace internal 351 } // namespace internal
350 } // namespace v8 352 } // namespace v8
351 353
352 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 354 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/machine-node-factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698