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

Unified Diff: runtime/vm/intermediate_language_ia32.cc

Issue 15692005: Fix a bug in optimized ARM code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_ia32.cc
===================================================================
--- runtime/vm/intermediate_language_ia32.cc (revision 23168)
+++ runtime/vm/intermediate_language_ia32.cc (working copy)
@@ -629,6 +629,25 @@
}
+static Condition FlipCondition(Condition condition) {
+ switch (condition) {
+ case EQUAL: return EQUAL;
+ case NOT_EQUAL: return NOT_EQUAL;
+ case LESS: return GREATER;
+ case LESS_EQUAL: return GREATER_EQUAL;
+ case GREATER: return LESS;
+ case GREATER_EQUAL: return LESS_EQUAL;
+ case BELOW: return ABOVE;
+ case BELOW_EQUAL: return ABOVE_EQUAL;
+ case ABOVE: return BELOW;
+ case ABOVE_EQUAL: return BELOW_EQUAL;
+ default:
+ UNIMPLEMENTED();
+ return EQUAL;
+ }
+}
+
+
static void EmitSmiComparisonOp(FlowGraphCompiler* compiler,
const LocationSummary& locs,
Token::Kind kind,
@@ -641,7 +660,7 @@
if (left.IsConstant()) {
__ CompareObject(right.reg(), left.constant());
- true_condition = FlowGraphCompiler::FlipCondition(true_condition);
+ true_condition = FlipCondition(true_condition);
} else if (right.IsConstant()) {
__ CompareObject(left.reg(), right.constant());
} else if (right.IsStackSlot()) {
@@ -749,11 +768,11 @@
__ cmpl(left_tmp, right_tmp);
if (branch != NULL) {
__ j(hi_cond, compiler->GetJumpLabel(branch->true_successor()));
- __ j(FlowGraphCompiler::FlipCondition(hi_cond),
+ __ j(FlipCondition(hi_cond),
compiler->GetJumpLabel(branch->false_successor()));
} else {
__ j(hi_cond, &is_true);
- __ j(FlowGraphCompiler::FlipCondition(hi_cond), &is_false);
+ __ j(FlipCondition(hi_cond), &is_false);
}
// If upper is equal, compare lower half.
« 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