| 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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 break; | 298 break; |
| 299 default: | 299 default: |
| 300 UNREACHABLE(); | 300 UNREACHABLE(); |
| 301 } | 301 } |
| 302 } | 302 } |
| 303 } | 303 } |
| 304 | 304 |
| 305 | 305 |
| 306 LocationSummary* AssertAssignableInstr::MakeLocationSummary(Zone* zone, | 306 LocationSummary* AssertAssignableInstr::MakeLocationSummary(Zone* zone, |
| 307 bool opt) const { | 307 bool opt) const { |
| 308 const intptr_t kNumInputs = 3; | 308 const intptr_t kNumInputs = 2; |
| 309 const intptr_t kNumTemps = 0; | 309 const intptr_t kNumTemps = 0; |
| 310 LocationSummary* summary = new(zone) LocationSummary( | 310 LocationSummary* summary = new(zone) LocationSummary( |
| 311 zone, kNumInputs, kNumTemps, LocationSummary::kCall); | 311 zone, kNumInputs, kNumTemps, LocationSummary::kCall); |
| 312 summary->set_in(0, Location::RegisterLocation(RAX)); // Value. | 312 summary->set_in(0, Location::RegisterLocation(RAX)); // Value. |
| 313 summary->set_in(1, Location::RegisterLocation(RCX)); // Instantiator. | 313 summary->set_in(1, Location::RegisterLocation(RDX)); // Type arguments. |
| 314 summary->set_in(2, Location::RegisterLocation(RDX)); // Type arguments. | |
| 315 summary->set_out(0, Location::RegisterLocation(RAX)); | 314 summary->set_out(0, Location::RegisterLocation(RAX)); |
| 316 return summary; | 315 return summary; |
| 317 } | 316 } |
| 318 | 317 |
| 319 | 318 |
| 320 LocationSummary* AssertBooleanInstr::MakeLocationSummary(Zone* zone, | 319 LocationSummary* AssertBooleanInstr::MakeLocationSummary(Zone* zone, |
| 321 bool opt) const { | 320 bool opt) const { |
| 322 const intptr_t kNumInputs = 1; | 321 const intptr_t kNumInputs = 1; |
| 323 const intptr_t kNumTemps = 0; | 322 const intptr_t kNumTemps = 0; |
| 324 LocationSummary* locs = new(zone) LocationSummary( | 323 LocationSummary* locs = new(zone) LocationSummary( |
| (...skipping 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2006 CanValueBeSmi()); | 2005 CanValueBeSmi()); |
| 2007 } else { | 2006 } else { |
| 2008 __ StoreIntoObjectNoBarrier( | 2007 __ StoreIntoObjectNoBarrier( |
| 2009 temp, FieldAddress(temp, Field::static_value_offset()), value); | 2008 temp, FieldAddress(temp, Field::static_value_offset()), value); |
| 2010 } | 2009 } |
| 2011 } | 2010 } |
| 2012 | 2011 |
| 2013 | 2012 |
| 2014 LocationSummary* InstanceOfInstr::MakeLocationSummary(Zone* zone, | 2013 LocationSummary* InstanceOfInstr::MakeLocationSummary(Zone* zone, |
| 2015 bool opt) const { | 2014 bool opt) const { |
| 2016 const intptr_t kNumInputs = 3; | 2015 const intptr_t kNumInputs = 2; |
| 2017 const intptr_t kNumTemps = 0; | 2016 const intptr_t kNumTemps = 0; |
| 2018 LocationSummary* summary = new(zone) LocationSummary( | 2017 LocationSummary* summary = new(zone) LocationSummary( |
| 2019 zone, kNumInputs, kNumTemps, LocationSummary::kCall); | 2018 zone, kNumInputs, kNumTemps, LocationSummary::kCall); |
| 2020 summary->set_in(0, Location::RegisterLocation(RAX)); | 2019 summary->set_in(0, Location::RegisterLocation(RAX)); |
| 2021 summary->set_in(1, Location::RegisterLocation(RCX)); | 2020 summary->set_in(1, Location::RegisterLocation(RDX)); |
| 2022 summary->set_in(2, Location::RegisterLocation(RDX)); | |
| 2023 summary->set_out(0, Location::RegisterLocation(RAX)); | 2021 summary->set_out(0, Location::RegisterLocation(RAX)); |
| 2024 return summary; | 2022 return summary; |
| 2025 } | 2023 } |
| 2026 | 2024 |
| 2027 | 2025 |
| 2028 void InstanceOfInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2026 void InstanceOfInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2029 ASSERT(locs()->in(0).reg() == RAX); // Value. | 2027 ASSERT(locs()->in(0).reg() == RAX); // Value. |
| 2030 ASSERT(locs()->in(1).reg() == RCX); // Instantiator. | 2028 ASSERT(locs()->in(1).reg() == RDX); // Instantiator type arguments. |
| 2031 ASSERT(locs()->in(2).reg() == RDX); // Instantiator type arguments. | |
| 2032 | 2029 |
| 2033 compiler->GenerateInstanceOf(token_pos(), | 2030 compiler->GenerateInstanceOf(token_pos(), |
| 2034 deopt_id(), | 2031 deopt_id(), |
| 2035 type(), | 2032 type(), |
| 2036 negate_result(), | 2033 negate_result(), |
| 2037 locs()); | 2034 locs()); |
| 2038 ASSERT(locs()->out(0).reg() == RAX); | 2035 ASSERT(locs()->out(0).reg() == RAX); |
| 2039 } | 2036 } |
| 2040 | 2037 |
| 2041 | 2038 |
| (...skipping 4413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6455 __ Drop(1); | 6452 __ Drop(1); |
| 6456 __ popq(result); | 6453 __ popq(result); |
| 6457 } | 6454 } |
| 6458 | 6455 |
| 6459 | 6456 |
| 6460 } // namespace dart | 6457 } // namespace dart |
| 6461 | 6458 |
| 6462 #undef __ | 6459 #undef __ |
| 6463 | 6460 |
| 6464 #endif // defined TARGET_ARCH_X64 | 6461 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |