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

Unified Diff: runtime/vm/intermediate_language_mips.cc

Issue 1377113004: VM: Support phis with pair representations. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: rebased Created 5 years, 2 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_ia32.cc ('k') | tests/language/bit_shift_test.dart » ('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 15fc876447e14290bcace045e6ef32ca99e79471..e381157f3a995b98cecc9647d3c430bfebc5f310 100644
--- a/runtime/vm/intermediate_language_mips.cc
+++ b/runtime/vm/intermediate_language_mips.cc
@@ -4931,12 +4931,19 @@ void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
__ or_(out_lo, out_lo, TMP);
__ sra(out_hi, left_hi, shift);
} else {
- __ sra(out_lo, left_hi, shift - 32);
+ if (shift == 32) {
+ __ mov(out_lo, left_hi);
+ } else if (shift < 64) {
+ __ sra(out_lo, left_hi, shift - 32);
+ } else {
+ __ sra(out_lo, left_hi, 31);
+ }
__ sra(out_hi, left_hi, 31);
}
break;
}
case Token::kSHL: {
+ ASSERT(shift < 64);
if (shift < 32) {
__ srl(out_hi, left_lo, 32 - shift);
__ sll(TMP, left_hi, shift);
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | tests/language/bit_shift_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698