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

Side by Side Diff: runtime/vm/intermediate_language_mips.cc

Issue 807593002: Merge RawICData::range_feedback_ field into RawICData::state_bits_. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 | Annotate | Revision Log
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 4912 matching lines...) Expand 10 before | Expand all | Expand 10 after
4923 void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 4923 void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4924 PairLocation* left_pair = locs()->in(0).AsPairLocation(); 4924 PairLocation* left_pair = locs()->in(0).AsPairLocation();
4925 Register left_lo = left_pair->At(0).reg(); 4925 Register left_lo = left_pair->At(0).reg();
4926 Register left_hi = left_pair->At(1).reg(); 4926 Register left_hi = left_pair->At(1).reg();
4927 PairLocation* out_pair = locs()->out(0).AsPairLocation(); 4927 PairLocation* out_pair = locs()->out(0).AsPairLocation();
4928 Register out_lo = out_pair->At(0).reg(); 4928 Register out_lo = out_pair->At(0).reg();
4929 Register out_hi = out_pair->At(1).reg(); 4929 Register out_hi = out_pair->At(1).reg();
4930 4930
4931 Label* deopt = NULL; 4931 Label* deopt = NULL;
4932 if (CanDeoptimize()) { 4932 if (CanDeoptimize()) {
4933 deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptShiftMintOp); 4933 deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryMintOp);
4934 } 4934 }
4935 if (locs()->in(1).IsConstant()) { 4935 if (locs()->in(1).IsConstant()) {
4936 // Code for a constant shift amount. 4936 // Code for a constant shift amount.
4937 ASSERT(locs()->in(1).constant().IsSmi()); 4937 ASSERT(locs()->in(1).constant().IsSmi());
4938 const int32_t shift = 4938 const int32_t shift =
4939 reinterpret_cast<int32_t>(locs()->in(1).constant().raw()) >> 1; 4939 reinterpret_cast<int32_t>(locs()->in(1).constant().raw()) >> 1;
4940 switch (op_kind()) { 4940 switch (op_kind()) {
4941 case Token::kSHR: { 4941 case Token::kSHR: {
4942 if (shift < 32) { 4942 if (shift < 32) {
4943 __ sll(out_lo, left_hi, 32 - shift); 4943 __ sll(out_lo, left_hi, 32 - shift);
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
5173 5173
5174 void ShiftUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 5174 void ShiftUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5175 const intptr_t kShifterLimit = 31; 5175 const intptr_t kShifterLimit = 31;
5176 5176
5177 Register left = locs()->in(0).reg(); 5177 Register left = locs()->in(0).reg();
5178 Register out = locs()->out(0).reg(); 5178 Register out = locs()->out(0).reg();
5179 Register temp = locs()->temp(0).reg(); 5179 Register temp = locs()->temp(0).reg();
5180 5180
5181 ASSERT(left != out); 5181 ASSERT(left != out);
5182 5182
5183 Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptShiftMintOp); 5183 Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryMintOp);
5184 5184
5185 if (locs()->in(1).IsConstant()) { 5185 if (locs()->in(1).IsConstant()) {
5186 // Shifter is constant. 5186 // Shifter is constant.
5187 5187
5188 const Object& constant = locs()->in(1).constant(); 5188 const Object& constant = locs()->in(1).constant();
5189 ASSERT(constant.IsSmi()); 5189 ASSERT(constant.IsSmi());
5190 const intptr_t shift_value = Smi::Cast(constant).Value(); 5190 const intptr_t shift_value = Smi::Cast(constant).Value();
5191 5191
5192 // Do the shift: (shift_value > 0) && (shift_value <= kShifterLimit). 5192 // Do the shift: (shift_value > 0) && (shift_value <= kShifterLimit).
5193 switch (op_kind()) { 5193 switch (op_kind()) {
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
5569 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); 5569 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
5570 #if defined(DEBUG) 5570 #if defined(DEBUG)
5571 __ LoadImmediate(S4, kInvalidObjectPointer); 5571 __ LoadImmediate(S4, kInvalidObjectPointer);
5572 __ LoadImmediate(S5, kInvalidObjectPointer); 5572 __ LoadImmediate(S5, kInvalidObjectPointer);
5573 #endif 5573 #endif
5574 } 5574 }
5575 5575
5576 } // namespace dart 5576 } // namespace dart
5577 5577
5578 #endif // defined TARGET_ARCH_MIPS 5578 #endif // defined TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698