| 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/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 | 387 |
| 388 default: | 388 default: |
| 389 UNREACHABLE(); | 389 UNREACHABLE(); |
| 390 } | 390 } |
| 391 } | 391 } |
| 392 } | 392 } |
| 393 | 393 |
| 394 | 394 |
| 395 LocationSummary* AssertAssignableInstr::MakeLocationSummary(Zone* zone, | 395 LocationSummary* AssertAssignableInstr::MakeLocationSummary(Zone* zone, |
| 396 bool opt) const { | 396 bool opt) const { |
| 397 const intptr_t kNumInputs = 3; | 397 const intptr_t kNumInputs = 2; |
| 398 const intptr_t kNumTemps = 0; | 398 const intptr_t kNumTemps = 0; |
| 399 LocationSummary* summary = new(zone) LocationSummary( | 399 LocationSummary* summary = new(zone) LocationSummary( |
| 400 zone, kNumInputs, kNumTemps, LocationSummary::kCall); | 400 zone, kNumInputs, kNumTemps, LocationSummary::kCall); |
| 401 summary->set_in(0, Location::RegisterLocation(A0)); // Value. | 401 summary->set_in(0, Location::RegisterLocation(A0)); // Value. |
| 402 summary->set_in(1, Location::RegisterLocation(A2)); // Instantiator. | 402 summary->set_in(1, Location::RegisterLocation(A1)); // Type arguments. |
| 403 summary->set_in(2, Location::RegisterLocation(A1)); // Type arguments. | |
| 404 summary->set_out(0, Location::RegisterLocation(A0)); | 403 summary->set_out(0, Location::RegisterLocation(A0)); |
| 405 return summary; | 404 return summary; |
| 406 } | 405 } |
| 407 | 406 |
| 408 | 407 |
| 409 LocationSummary* AssertBooleanInstr::MakeLocationSummary(Zone* zone, | 408 LocationSummary* AssertBooleanInstr::MakeLocationSummary(Zone* zone, |
| 410 bool opt) const { | 409 bool opt) const { |
| 411 const intptr_t kNumInputs = 1; | 410 const intptr_t kNumInputs = 1; |
| 412 const intptr_t kNumTemps = 0; | 411 const intptr_t kNumTemps = 0; |
| 413 LocationSummary* locs = new(zone) LocationSummary( | 412 LocationSummary* locs = new(zone) LocationSummary( |
| (...skipping 1707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2121 CanValueBeSmi()); | 2120 CanValueBeSmi()); |
| 2122 } else { | 2121 } else { |
| 2123 __ StoreIntoObjectNoBarrier( | 2122 __ StoreIntoObjectNoBarrier( |
| 2124 temp, FieldAddress(temp, Field::static_value_offset()), value); | 2123 temp, FieldAddress(temp, Field::static_value_offset()), value); |
| 2125 } | 2124 } |
| 2126 } | 2125 } |
| 2127 | 2126 |
| 2128 | 2127 |
| 2129 LocationSummary* InstanceOfInstr::MakeLocationSummary(Zone* zone, | 2128 LocationSummary* InstanceOfInstr::MakeLocationSummary(Zone* zone, |
| 2130 bool opt) const { | 2129 bool opt) const { |
| 2131 const intptr_t kNumInputs = 3; | 2130 const intptr_t kNumInputs = 2; |
| 2132 const intptr_t kNumTemps = 0; | 2131 const intptr_t kNumTemps = 0; |
| 2133 LocationSummary* summary = new(zone) LocationSummary( | 2132 LocationSummary* summary = new(zone) LocationSummary( |
| 2134 zone, kNumInputs, kNumTemps, LocationSummary::kCall); | 2133 zone, kNumInputs, kNumTemps, LocationSummary::kCall); |
| 2135 summary->set_in(0, Location::RegisterLocation(A0)); | 2134 summary->set_in(0, Location::RegisterLocation(A0)); |
| 2136 summary->set_in(1, Location::RegisterLocation(A2)); | 2135 summary->set_in(1, Location::RegisterLocation(A1)); |
| 2137 summary->set_in(2, Location::RegisterLocation(A1)); | |
| 2138 summary->set_out(0, Location::RegisterLocation(V0)); | 2136 summary->set_out(0, Location::RegisterLocation(V0)); |
| 2139 return summary; | 2137 return summary; |
| 2140 } | 2138 } |
| 2141 | 2139 |
| 2142 | 2140 |
| 2143 void InstanceOfInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2141 void InstanceOfInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2144 ASSERT(locs()->in(0).reg() == A0); // Value. | 2142 ASSERT(locs()->in(0).reg() == A0); // Value. |
| 2145 ASSERT(locs()->in(1).reg() == A2); // Instantiator. | 2143 ASSERT(locs()->in(1).reg() == A1); // Instantiator type arguments. |
| 2146 ASSERT(locs()->in(2).reg() == A1); // Instantiator type arguments. | |
| 2147 | 2144 |
| 2148 __ Comment("InstanceOfInstr"); | 2145 __ Comment("InstanceOfInstr"); |
| 2149 compiler->GenerateInstanceOf(token_pos(), | 2146 compiler->GenerateInstanceOf(token_pos(), |
| 2150 deopt_id(), | 2147 deopt_id(), |
| 2151 type(), | 2148 type(), |
| 2152 negate_result(), | 2149 negate_result(), |
| 2153 locs()); | 2150 locs()); |
| 2154 ASSERT(locs()->out(0).reg() == V0); | 2151 ASSERT(locs()->out(0).reg() == V0); |
| 2155 } | 2152 } |
| 2156 | 2153 |
| (...skipping 3443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5600 1, | 5597 1, |
| 5601 locs()); | 5598 locs()); |
| 5602 __ lw(result, Address(SP, 1 * kWordSize)); | 5599 __ lw(result, Address(SP, 1 * kWordSize)); |
| 5603 __ addiu(SP, SP, Immediate(2 * kWordSize)); | 5600 __ addiu(SP, SP, Immediate(2 * kWordSize)); |
| 5604 } | 5601 } |
| 5605 | 5602 |
| 5606 | 5603 |
| 5607 } // namespace dart | 5604 } // namespace dart |
| 5608 | 5605 |
| 5609 #endif // defined TARGET_ARCH_MIPS | 5606 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |