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

Unified Diff: runtime/vm/intermediate_language_mips.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
Index: runtime/vm/intermediate_language_mips.cc
diff --git a/runtime/vm/intermediate_language_mips.cc b/runtime/vm/intermediate_language_mips.cc
index 7342fb698f6d42b1d7d01eee8f7d4a6afed788b4..b34ac4cc2e91e6b3a8ffea1a3c24eb4486f200ac 100644
--- a/runtime/vm/intermediate_language_mips.cc
+++ b/runtime/vm/intermediate_language_mips.cc
@@ -2940,6 +2940,14 @@ void CheckedSmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
__ SubuDetectOverflow(result, left, right, CMPRES1);
__ bltz(CMPRES1, slow_path->entry_label());
break;
+ case Token::kMUL:
+ __ sra(TMP, left, kSmiTagSize);
+ __ mult(TMP, right);
+ __ mflo(result);
+ __ mfhi(CMPRES2);
+ __ sra(CMPRES1, result, 31);
+ __ bne(CMPRES1, CMPRES2, slow_path->entry_label());
+ break;
case Token::kBIT_OR:
// Operation part of combined smi check.
break;

Powered by Google App Engine
This is Rietveld 408576698