| OLD | NEW |
| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 void ConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 292 void ConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 293 // The register allocator drops constant definitions that have no uses. | 293 // The register allocator drops constant definitions that have no uses. |
| 294 if (!locs()->out(0).IsInvalid()) { | 294 if (!locs()->out(0).IsInvalid()) { |
| 295 __ TraceSimMsg("ConstantInstr"); | 295 __ TraceSimMsg("ConstantInstr"); |
| 296 Register result = locs()->out(0).reg(); | 296 Register result = locs()->out(0).reg(); |
| 297 __ LoadObject(result, value()); | 297 __ LoadObject(result, value()); |
| 298 } | 298 } |
| 299 } | 299 } |
| 300 | 300 |
| 301 | 301 |
| 302 LocationSummary* UnboxedConstantInstr::MakeLocationSummary(bool opt) const { |
| 303 const intptr_t kNumInputs = 0; |
| 304 const intptr_t kNumTemps = 1; |
| 305 LocationSummary* locs = |
| 306 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 307 locs->set_out(0, Location::RequiresFpuRegister()); |
| 308 locs->set_temp(0, Location::RequiresRegister()); |
| 309 return locs; |
| 310 } |
| 311 |
| 312 |
| 313 void UnboxedConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 314 // The register allocator drops constant definitions that have no uses. |
| 315 if (!locs()->out(0).IsInvalid()) { |
| 316 ASSERT(value().IsDouble()); |
| 317 const Register const_value = locs()->temp(0).reg(); |
| 318 const DRegister result = locs()->out(0).fpu_reg(); |
| 319 __ LoadObject(const_value, value()); |
| 320 __ LoadDFromOffset(result, const_value, |
| 321 Double::value_offset() - kHeapObjectTag); |
| 322 } |
| 323 } |
| 324 |
| 325 |
| 302 LocationSummary* AssertAssignableInstr::MakeLocationSummary(bool opt) const { | 326 LocationSummary* AssertAssignableInstr::MakeLocationSummary(bool opt) const { |
| 303 const intptr_t kNumInputs = 3; | 327 const intptr_t kNumInputs = 3; |
| 304 const intptr_t kNumTemps = 0; | 328 const intptr_t kNumTemps = 0; |
| 305 LocationSummary* summary = | 329 LocationSummary* summary = |
| 306 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 330 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); |
| 307 summary->set_in(0, Location::RegisterLocation(A0)); // Value. | 331 summary->set_in(0, Location::RegisterLocation(A0)); // Value. |
| 308 summary->set_in(1, Location::RegisterLocation(A2)); // Instantiator. | 332 summary->set_in(1, Location::RegisterLocation(A2)); // Instantiator. |
| 309 summary->set_in(2, Location::RegisterLocation(A1)); // Type arguments. | 333 summary->set_in(2, Location::RegisterLocation(A1)); // Type arguments. |
| 310 summary->set_out(0, Location::RegisterLocation(A0)); | 334 summary->set_out(0, Location::RegisterLocation(A0)); |
| 311 return summary; | 335 return summary; |
| (...skipping 4151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4463 compiler->GenerateCall(token_pos(), | 4487 compiler->GenerateCall(token_pos(), |
| 4464 &label, | 4488 &label, |
| 4465 PcDescriptors::kOther, | 4489 PcDescriptors::kOther, |
| 4466 locs()); | 4490 locs()); |
| 4467 __ Drop(ArgumentCount()); // Discard arguments. | 4491 __ Drop(ArgumentCount()); // Discard arguments. |
| 4468 } | 4492 } |
| 4469 | 4493 |
| 4470 } // namespace dart | 4494 } // namespace dart |
| 4471 | 4495 |
| 4472 #endif // defined TARGET_ARCH_MIPS | 4496 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |