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

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: updated inlining of numeric operators 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
« no previous file with comments | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_mips.cc
diff --git a/runtime/vm/intermediate_language_mips.cc b/runtime/vm/intermediate_language_mips.cc
index d1fd55c3b4b43e7fd306eb0cf236e1f3b0ca4e8a..022d6b53d36a0d456d2ba4185b73b743e92ab7bf 100644
--- a/runtime/vm/intermediate_language_mips.cc
+++ b/runtime/vm/intermediate_language_mips.cc
@@ -2952,6 +2952,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.
if (!combined_smi_check) {
« no previous file with comments | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698