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

Unified Diff: runtime/vm/intermediate_language_x64.cc

Issue 1824023002: VM: Fix a couple of issues in the AOT optimizer, add fast path smi multiply. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
« runtime/vm/aot_optimizer.cc ('K') | « runtime/vm/intermediate_language_mips.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_x64.cc
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
index 1738532b8acfe29782089f7cdfe2583f659b9f05..7e39b45d861db400d65605922a5307b93f5a240e 100644
--- a/runtime/vm/intermediate_language_x64.cc
+++ b/runtime/vm/intermediate_language_x64.cc
@@ -2829,6 +2829,7 @@ LocationSummary* CheckedSmiOpInstr::MakeLocationSummary(Zone* zone,
case Token::kGTE:
case Token::kADD:
case Token::kSUB:
+ case Token::kMUL:
summary->set_out(0, Location::RequiresRegister());
break;
case Token::kBIT_OR:
@@ -2866,6 +2867,12 @@ void CheckedSmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
__ subq(result, right);
__ j(OVERFLOW, slow_path->entry_label());
break;
+ case Token::kMUL:
+ __ movq(result, left);
+ __ SmiUntag(result);
+ __ imulq(result, right);
+ __ j(OVERFLOW, slow_path->entry_label());
+ break;
case Token::kBIT_OR:
ASSERT(left == result);
__ orq(result, right);
« runtime/vm/aot_optimizer.cc ('K') | « runtime/vm/intermediate_language_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698