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

Unified Diff: vm/intermediate_language_x64.cc

Issue 10823258: Match input operand count of BranchInstr with the input location count. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« vm/intermediate_language_ia32.cc ('K') | « vm/intermediate_language_ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/intermediate_language_x64.cc
===================================================================
--- vm/intermediate_language_x64.cc (revision 10446)
+++ vm/intermediate_language_x64.cc (working copy)
@@ -2005,7 +2005,13 @@
// Otherwise polymorphic dispatch.
}
// Call.
- return Computation::MakeCallSummary();
+ const intptr_t kNumInputs = 2;
+ const intptr_t kNumTemps = 0;
+ LocationSummary* locs =
+ new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
+ locs->set_in(0, Location::RegisterLocation(RAX));
+ locs->set_in(1, Location::RegisterLocation(RCX));
srdjan 2012/08/09 19:56:49 ditto
+ return locs;
}
@@ -2038,6 +2044,10 @@
}
// Otherwise polymorphic dispatch?
}
+ Register left = locs()->in(0).reg();
+ Register right = locs()->in(1).reg();
+ __ pushq(left);
+ __ pushq(right);
// Not equal is always split into '==' and negate,
Condition branch_condition = (kind() == Token::kNE) ? NOT_EQUAL : EQUAL;
Token::Kind call_kind = (kind() == Token::kNE) ? Token::kEQ : kind();
@@ -2056,8 +2066,7 @@
kNumArguments,
Array::ZoneHandle(), // No optional arguments.
kNumArgsChecked);
- ASSERT(locs()->out().reg() == RAX);
- __ CompareObject(locs()->out().reg(), compiler->bool_true());
+ __ CompareObject(RAX, compiler->bool_true());
EmitBranchOnCondition(compiler, branch_condition);
}
« vm/intermediate_language_ia32.cc ('K') | « vm/intermediate_language_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698