OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 default: | 326 default: |
327 UNREACHABLE(); | 327 UNREACHABLE(); |
328 break; | 328 break; |
329 } | 329 } |
330 } | 330 } |
331 } | 331 } |
332 | 332 |
333 | 333 |
334 LocationSummary* AssertAssignableInstr::MakeLocationSummary(Zone* zone, | 334 LocationSummary* AssertAssignableInstr::MakeLocationSummary(Zone* zone, |
335 bool opt) const { | 335 bool opt) const { |
336 const intptr_t kNumInputs = 3; | 336 const intptr_t kNumInputs = 2; |
337 const intptr_t kNumTemps = 0; | 337 const intptr_t kNumTemps = 0; |
338 LocationSummary* summary = new(zone) LocationSummary( | 338 LocationSummary* summary = new(zone) LocationSummary( |
339 zone, kNumInputs, kNumTemps, LocationSummary::kCall); | 339 zone, kNumInputs, kNumTemps, LocationSummary::kCall); |
340 summary->set_in(0, Location::RegisterLocation(R0)); // Value. | 340 summary->set_in(0, Location::RegisterLocation(R0)); // Value. |
341 summary->set_in(1, Location::RegisterLocation(R2)); // Instantiator. | 341 summary->set_in(1, Location::RegisterLocation(R1)); // Type arguments. |
342 summary->set_in(2, Location::RegisterLocation(R1)); // Type arguments. | |
343 summary->set_out(0, Location::RegisterLocation(R0)); | 342 summary->set_out(0, Location::RegisterLocation(R0)); |
344 return summary; | 343 return summary; |
345 } | 344 } |
346 | 345 |
347 | 346 |
348 LocationSummary* AssertBooleanInstr::MakeLocationSummary(Zone* zone, | 347 LocationSummary* AssertBooleanInstr::MakeLocationSummary(Zone* zone, |
349 bool opt) const { | 348 bool opt) const { |
350 const intptr_t kNumInputs = 1; | 349 const intptr_t kNumInputs = 1; |
351 const intptr_t kNumTemps = 0; | 350 const intptr_t kNumTemps = 0; |
352 LocationSummary* locs = new(zone) LocationSummary( | 351 LocationSummary* locs = new(zone) LocationSummary( |
(...skipping 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1988 } else { | 1987 } else { |
1989 __ StoreIntoObjectOffsetNoBarrier(temp, | 1988 __ StoreIntoObjectOffsetNoBarrier(temp, |
1990 Field::static_value_offset(), | 1989 Field::static_value_offset(), |
1991 value); | 1990 value); |
1992 } | 1991 } |
1993 } | 1992 } |
1994 | 1993 |
1995 | 1994 |
1996 LocationSummary* InstanceOfInstr::MakeLocationSummary(Zone* zone, | 1995 LocationSummary* InstanceOfInstr::MakeLocationSummary(Zone* zone, |
1997 bool opt) const { | 1996 bool opt) const { |
1998 const intptr_t kNumInputs = 3; | 1997 const intptr_t kNumInputs = 2; |
1999 const intptr_t kNumTemps = 0; | 1998 const intptr_t kNumTemps = 0; |
2000 LocationSummary* summary = new(zone) LocationSummary( | 1999 LocationSummary* summary = new(zone) LocationSummary( |
2001 zone, kNumInputs, kNumTemps, LocationSummary::kCall); | 2000 zone, kNumInputs, kNumTemps, LocationSummary::kCall); |
2002 summary->set_in(0, Location::RegisterLocation(R0)); | 2001 summary->set_in(0, Location::RegisterLocation(R0)); |
2003 summary->set_in(1, Location::RegisterLocation(R2)); | 2002 summary->set_in(1, Location::RegisterLocation(R1)); |
2004 summary->set_in(2, Location::RegisterLocation(R1)); | |
2005 summary->set_out(0, Location::RegisterLocation(R0)); | 2003 summary->set_out(0, Location::RegisterLocation(R0)); |
2006 return summary; | 2004 return summary; |
2007 } | 2005 } |
2008 | 2006 |
2009 | 2007 |
2010 void InstanceOfInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2008 void InstanceOfInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
2011 ASSERT(locs()->in(0).reg() == R0); // Value. | 2009 ASSERT(locs()->in(0).reg() == R0); // Value. |
2012 ASSERT(locs()->in(1).reg() == R2); // Instantiator. | 2010 ASSERT(locs()->in(1).reg() == R1); // Instantiator type arguments. |
2013 ASSERT(locs()->in(2).reg() == R1); // Instantiator type arguments. | |
2014 | 2011 |
2015 compiler->GenerateInstanceOf(token_pos(), | 2012 compiler->GenerateInstanceOf(token_pos(), |
2016 deopt_id(), | 2013 deopt_id(), |
2017 type(), | 2014 type(), |
2018 negate_result(), | 2015 negate_result(), |
2019 locs()); | 2016 locs()); |
2020 ASSERT(locs()->out(0).reg() == R0); | 2017 ASSERT(locs()->out(0).reg() == R0); |
2021 } | 2018 } |
2022 | 2019 |
2023 | 2020 |
(...skipping 3601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5625 1, | 5622 1, |
5626 locs()); | 5623 locs()); |
5627 __ Drop(1); | 5624 __ Drop(1); |
5628 __ Pop(result); | 5625 __ Pop(result); |
5629 } | 5626 } |
5630 | 5627 |
5631 | 5628 |
5632 } // namespace dart | 5629 } // namespace dart |
5633 | 5630 |
5634 #endif // defined TARGET_ARCH_ARM64 | 5631 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |