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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 4913 matching lines...) Expand 10 before | Expand all | Expand 10 after
4924 const int32_t shift = 4924 const int32_t shift =
4925 reinterpret_cast<int32_t>(locs()->in(1).constant().raw()) >> 1; 4925 reinterpret_cast<int32_t>(locs()->in(1).constant().raw()) >> 1;
4926 switch (op_kind()) { 4926 switch (op_kind()) {
4927 case Token::kSHR: { 4927 case Token::kSHR: {
4928 if (shift < 32) { 4928 if (shift < 32) {
4929 __ sll(out_lo, left_hi, 32 - shift); 4929 __ sll(out_lo, left_hi, 32 - shift);
4930 __ srl(TMP, left_lo, shift); 4930 __ srl(TMP, left_lo, shift);
4931 __ or_(out_lo, out_lo, TMP); 4931 __ or_(out_lo, out_lo, TMP);
4932 __ sra(out_hi, left_hi, shift); 4932 __ sra(out_hi, left_hi, shift);
4933 } else { 4933 } else {
4934 __ sra(out_lo, left_hi, shift - 32); 4934 if (shift == 32) {
4935 __ mov(out_lo, left_hi);
4936 } else if (shift < 64) {
4937 __ sra(out_lo, left_hi, shift - 32);
4938 } else {
4939 __ sra(out_lo, left_hi, 31);
4940 }
4935 __ sra(out_hi, left_hi, 31); 4941 __ sra(out_hi, left_hi, 31);
4936 } 4942 }
4937 break; 4943 break;
4938 } 4944 }
4939 case Token::kSHL: { 4945 case Token::kSHL: {
4946 ASSERT(shift < 64);
4940 if (shift < 32) { 4947 if (shift < 32) {
4941 __ srl(out_hi, left_lo, 32 - shift); 4948 __ srl(out_hi, left_lo, 32 - shift);
4942 __ sll(TMP, left_hi, shift); 4949 __ sll(TMP, left_hi, shift);
4943 __ or_(out_hi, out_hi, TMP); 4950 __ or_(out_hi, out_hi, TMP);
4944 __ sll(out_lo, left_lo, shift); 4951 __ sll(out_lo, left_lo, shift);
4945 } else { 4952 } else {
4946 __ sll(out_hi, left_lo, shift - 32); 4953 __ sll(out_hi, left_lo, shift - 32);
4947 __ mov(out_lo, ZR); 4954 __ mov(out_lo, ZR);
4948 } 4955 }
4949 // Check for overflow. 4956 // Check for overflow.
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
5596 1, 5603 1,
5597 locs()); 5604 locs());
5598 __ lw(result, Address(SP, 1 * kWordSize)); 5605 __ lw(result, Address(SP, 1 * kWordSize));
5599 __ addiu(SP, SP, Immediate(2 * kWordSize)); 5606 __ addiu(SP, SP, Immediate(2 * kWordSize));
5600 } 5607 }
5601 5608
5602 5609
5603 } // namespace dart 5610 } // namespace dart
5604 5611
5605 #endif // defined TARGET_ARCH_MIPS 5612 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« 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