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

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

Issue 602993002: Frees up LR on arm for use by the register allocator. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | 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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 if (false_value != 0) { 193 if (false_value != 0) {
194 __ AddImmediate(result, Smi::RawValue(false_value)); 194 __ AddImmediate(result, Smi::RawValue(false_value));
195 } 195 }
196 } 196 }
197 } 197 }
198 198
199 199
200 LocationSummary* ClosureCallInstr::MakeLocationSummary(Isolate* isolate, 200 LocationSummary* ClosureCallInstr::MakeLocationSummary(Isolate* isolate,
201 bool opt) const { 201 bool opt) const {
202 const intptr_t kNumInputs = 1; 202 const intptr_t kNumInputs = 1;
203 const intptr_t kNumTemps = 0; 203 const intptr_t kNumTemps = 1;
204 LocationSummary* summary = new(isolate) LocationSummary( 204 LocationSummary* summary = new(isolate) LocationSummary(
205 isolate, kNumInputs, kNumTemps, LocationSummary::kCall); 205 isolate, kNumInputs, kNumTemps, LocationSummary::kCall);
206 summary->set_in(0, Location::RegisterLocation(R0)); // Function. 206 summary->set_in(0, Location::RegisterLocation(R0)); // Function.
207 // LR is clobbered by blx.
208 summary->set_temp(0, Location::RegisterLocation(LR));
Florian Schneider 2014/09/25 09:49:22 Calls clobber all registers, so I'm not sure if th
zra 2014/09/25 18:11:27 Done.
207 summary->set_out(0, Location::RegisterLocation(R0)); 209 summary->set_out(0, Location::RegisterLocation(R0));
208 return summary; 210 return summary;
209 } 211 }
210 212
211 213
212 void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 214 void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
213 // Load arguments descriptor in R4. 215 // Load arguments descriptor in R4.
214 int argument_count = ArgumentCount(); 216 int argument_count = ArgumentCount();
215 const Array& arguments_descriptor = 217 const Array& arguments_descriptor =
216 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count, 218 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count,
(...skipping 4869 matching lines...) Expand 10 before | Expand all | Expand 10 after
5086 __ vsqrtd(result, val); 5088 __ vsqrtd(result, val);
5087 } else if (kind() == MathUnaryInstr::kDoubleSquare) { 5089 } else if (kind() == MathUnaryInstr::kDoubleSquare) {
5088 const DRegister val = EvenDRegisterOf(locs()->in(0).fpu_reg()); 5090 const DRegister val = EvenDRegisterOf(locs()->in(0).fpu_reg());
5089 const DRegister result = EvenDRegisterOf(locs()->out(0).fpu_reg()); 5091 const DRegister result = EvenDRegisterOf(locs()->out(0).fpu_reg());
5090 __ vmuld(result, val, val); 5092 __ vmuld(result, val, val);
5091 } else { 5093 } else {
5092 ASSERT((kind() == MathUnaryInstr::kSin) || 5094 ASSERT((kind() == MathUnaryInstr::kSin) ||
5093 (kind() == MathUnaryInstr::kCos)); 5095 (kind() == MathUnaryInstr::kCos));
5094 if (TargetCPUFeatures::hardfp_supported()) { 5096 if (TargetCPUFeatures::hardfp_supported()) {
5095 __ CallRuntime(TargetFunction(), InputCount()); 5097 __ CallRuntime(TargetFunction(), InputCount());
5096 } else { 5098 } else {
5097 // If we aren't doing "hardfp", then we have to move the double arguments 5099 // If we aren't doing "hardfp", then we have to move the double arguments
5098 // to the integer registers, and take the results from the integer 5100 // to the integer registers, and take the results from the integer
5099 // registers. 5101 // registers.
5100 __ vmovrrd(R0, R1, D0); 5102 __ vmovrrd(R0, R1, D0);
5101 __ vmovrrd(R2, R3, D1); 5103 __ vmovrrd(R2, R3, D1);
5102 __ CallRuntime(TargetFunction(), InputCount()); 5104 __ CallRuntime(TargetFunction(), InputCount());
5103 __ vmovdrr(D0, R0, R1); 5105 __ vmovdrr(D0, R0, R1);
5104 __ vmovdrr(D1, R2, R3); 5106 __ vmovdrr(D1, R2, R3);
5105 } 5107 }
5106 } 5108 }
(...skipping 1924 matching lines...) Expand 10 before | Expand all | Expand 10 after
7031 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); 7033 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
7032 #if defined(DEBUG) 7034 #if defined(DEBUG)
7033 __ LoadImmediate(R4, kInvalidObjectPointer); 7035 __ LoadImmediate(R4, kInvalidObjectPointer);
7034 __ LoadImmediate(R5, kInvalidObjectPointer); 7036 __ LoadImmediate(R5, kInvalidObjectPointer);
7035 #endif 7037 #endif
7036 } 7038 }
7037 7039
7038 } // namespace dart 7040 } // namespace dart
7039 7041
7040 #endif // defined TARGET_ARCH_ARM 7042 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698