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

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

Issue 19849004: Fix simmips build, remove unnecessary temp register. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 "lib/error.h" 10 #include "lib/error.h"
(...skipping 3075 matching lines...) Expand 10 before | Expand all | Expand 10 after
3086 3086
3087 3087
3088 LocationSummary* MathMinMaxInstr::MakeLocationSummary() const { 3088 LocationSummary* MathMinMaxInstr::MakeLocationSummary() const {
3089 if (result_cid() == kDoubleCid) { 3089 if (result_cid() == kDoubleCid) {
3090 const intptr_t kNumInputs = 2; 3090 const intptr_t kNumInputs = 2;
3091 const intptr_t kNumTemps = 1; 3091 const intptr_t kNumTemps = 1;
3092 LocationSummary* summary = 3092 LocationSummary* summary =
3093 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); 3093 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
3094 summary->set_in(0, Location::RequiresFpuRegister()); 3094 summary->set_in(0, Location::RequiresFpuRegister());
3095 summary->set_in(1, Location::RequiresFpuRegister()); 3095 summary->set_in(1, Location::RequiresFpuRegister());
3096 summary->set_temp(0, Location::RequiresRegister());
3097 summary->set_out(Location::RequiresFpuRegister()); 3096 summary->set_out(Location::RequiresFpuRegister());
3098 return summary; 3097 return summary;
3099 } 3098 }
3100 ASSERT(result_cid() == kSmiCid); 3099 ASSERT(result_cid() == kSmiCid);
3101 UNIMPLEMENTED(); 3100 UNIMPLEMENTED();
3102 return NULL; 3101 return NULL;
3103 } 3102 }
3104 3103
3105 3104
3106 void MathMinMaxInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 3105 void MathMinMaxInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3107 if (result_cid() == kDoubleCid) { 3106 if (result_cid() == kDoubleCid) {
3108 Label done, is_nan, is_left; 3107 Label done, is_nan, is_left;
3109 DRegister left = locs()->in(0).fpu_reg(); 3108 DRegister left = locs()->in(0).fpu_reg();
3110 DRegister right = locs()->in(1).fpu_reg(); 3109 DRegister right = locs()->in(1).fpu_reg();
3111 DRegister result = locs()->out().fpu_reg(); 3110 DRegister result = locs()->out().fpu_reg();
3112 Register temp = locs()->temp(0).reg();
3113 __ cund(left, right); 3111 __ cund(left, right);
3114 __ bc1t(&is_nan); 3112 __ bc1t(&is_nan);
3115 if (op_kind() == MethodRecognizer::kMathMin) { 3113 if (op_kind() == MethodRecognizer::kMathMin) {
3116 __ coltd(left, right); 3114 __ coltd(left, right);
3117 } else { 3115 } else {
3118 ASSERT(op_kind() == MethodRecognizer::kMathMax); 3116 ASSERT(op_kind() == MethodRecognizer::kMathMax);
3119 __ coltd(right, left); 3117 __ coltd(right, left);
3120 } 3118 }
3121 // TODO(zra): Add conditional moves. 3119 // TODO(zra): Add conditional moves.
3122 __ bc1t(&is_left); 3120 __ bc1t(&is_left);
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
3823 compiler->GenerateCall(token_pos(), 3821 compiler->GenerateCall(token_pos(),
3824 &label, 3822 &label,
3825 PcDescriptors::kOther, 3823 PcDescriptors::kOther,
3826 locs()); 3824 locs());
3827 __ Drop(2); // Discard type arguments and receiver. 3825 __ Drop(2); // Discard type arguments and receiver.
3828 } 3826 }
3829 3827
3830 } // namespace dart 3828 } // namespace dart
3831 3829
3832 #endif // defined TARGET_ARCH_MIPS 3830 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698