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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 LocationSummary* summary = new (zone) | 213 LocationSummary* summary = new (zone) |
214 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall); | 214 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall); |
215 summary->set_in(0, Location::RegisterLocation(R0)); // Function. | 215 summary->set_in(0, Location::RegisterLocation(R0)); // Function. |
216 summary->set_out(0, Location::RegisterLocation(R0)); | 216 summary->set_out(0, Location::RegisterLocation(R0)); |
217 return summary; | 217 return summary; |
218 } | 218 } |
219 | 219 |
220 | 220 |
221 void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 221 void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
222 // Load arguments descriptor in R4. | 222 // Load arguments descriptor in R4. |
223 int argument_count = ArgumentCount(); | 223 const intptr_t argument_count = ArgumentCount(); // Includes type args. |
224 const Array& arguments_descriptor = Array::ZoneHandle( | 224 const Array& arguments_descriptor = GetArgumentsDescriptor(Z); |
225 ArgumentsDescriptor::New(argument_count, argument_names())); | |
226 __ LoadObject(R4, arguments_descriptor); | 225 __ LoadObject(R4, arguments_descriptor); |
227 | 226 |
228 // R4: Arguments descriptor. | 227 // R4: Arguments descriptor. |
229 // R0: Function. | 228 // R0: Function. |
230 ASSERT(locs()->in(0).reg() == R0); | 229 ASSERT(locs()->in(0).reg() == R0); |
231 __ LoadFieldFromOffset(CODE_REG, R0, Function::code_offset()); | 230 __ LoadFieldFromOffset(CODE_REG, R0, Function::code_offset()); |
232 __ LoadFieldFromOffset(R2, R0, Function::entry_point_offset()); | 231 __ LoadFieldFromOffset(R2, R0, Function::entry_point_offset()); |
233 | 232 |
234 // R2: instructions. | 233 // R2: instructions. |
235 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). | 234 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). |
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
908 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall); | 907 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall); |
909 summary->set_in(0, Location::RegisterLocation(R0)); | 908 summary->set_in(0, Location::RegisterLocation(R0)); |
910 summary->set_out(0, Location::RegisterLocation(R0)); | 909 summary->set_out(0, Location::RegisterLocation(R0)); |
911 return summary; | 910 return summary; |
912 } | 911 } |
913 | 912 |
914 | 913 |
915 void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 914 void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
916 const Register array = locs()->in(0).reg(); | 915 const Register array = locs()->in(0).reg(); |
917 __ Push(array); | 916 __ Push(array); |
| 917 const int kTypeArgsLen = 0; |
918 const int kNumberOfArguments = 1; | 918 const int kNumberOfArguments = 1; |
919 const Array& kNoArgumentNames = Object::null_array(); | 919 const Array& kNoArgumentNames = Object::null_array(); |
| 920 ArgumentsInfo args_info(kTypeArgsLen, kNumberOfArguments, kNoArgumentNames); |
920 compiler->GenerateStaticCall(deopt_id(), token_pos(), CallFunction(), | 921 compiler->GenerateStaticCall(deopt_id(), token_pos(), CallFunction(), |
921 kNumberOfArguments, kNoArgumentNames, locs(), | 922 args_info, locs(), ICData::Handle()); |
922 ICData::Handle()); | |
923 ASSERT(locs()->out(0).reg() == R0); | 923 ASSERT(locs()->out(0).reg() == R0); |
924 } | 924 } |
925 | 925 |
926 | 926 |
927 LocationSummary* LoadUntaggedInstr::MakeLocationSummary(Zone* zone, | 927 LocationSummary* LoadUntaggedInstr::MakeLocationSummary(Zone* zone, |
928 bool opt) const { | 928 bool opt) const { |
929 const intptr_t kNumInputs = 1; | 929 const intptr_t kNumInputs = 1; |
930 return LocationSummary::Make(zone, kNumInputs, Location::RequiresRegister(), | 930 return LocationSummary::Make(zone, kNumInputs, Location::RequiresRegister(), |
931 LocationSummary::kNoCall); | 931 LocationSummary::kNoCall); |
932 } | 932 } |
(...skipping 4162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5095 __ CompareImmediate(result, 0xC000000000000000); | 5095 __ CompareImmediate(result, 0xC000000000000000); |
5096 __ b(&do_call, MI); | 5096 __ b(&do_call, MI); |
5097 __ SmiTag(result); | 5097 __ SmiTag(result); |
5098 __ b(&done); | 5098 __ b(&done); |
5099 __ Bind(&do_call); | 5099 __ Bind(&do_call); |
5100 __ Push(value_obj); | 5100 __ Push(value_obj); |
5101 ASSERT(instance_call()->HasICData()); | 5101 ASSERT(instance_call()->HasICData()); |
5102 const ICData& ic_data = *instance_call()->ic_data(); | 5102 const ICData& ic_data = *instance_call()->ic_data(); |
5103 ASSERT(ic_data.NumberOfChecksIs(1)); | 5103 ASSERT(ic_data.NumberOfChecksIs(1)); |
5104 const Function& target = Function::ZoneHandle(ic_data.GetTargetAt(0)); | 5104 const Function& target = Function::ZoneHandle(ic_data.GetTargetAt(0)); |
5105 | 5105 const int kTypeArgsLen = 0; |
5106 const intptr_t kNumberOfArguments = 1; | 5106 const int kNumberOfArguments = 1; |
| 5107 const Array& kNoArgumentNames = Object::null_array(); |
| 5108 ArgumentsInfo args_info(kTypeArgsLen, kNumberOfArguments, kNoArgumentNames); |
5107 compiler->GenerateStaticCall(deopt_id(), instance_call()->token_pos(), target, | 5109 compiler->GenerateStaticCall(deopt_id(), instance_call()->token_pos(), target, |
5108 kNumberOfArguments, | 5110 args_info, locs(), ICData::Handle()); |
5109 Object::null_array(), // No argument names., | |
5110 locs(), ICData::Handle()); | |
5111 __ Bind(&done); | 5111 __ Bind(&done); |
5112 } | 5112 } |
5113 | 5113 |
5114 | 5114 |
5115 LocationSummary* DoubleToSmiInstr::MakeLocationSummary(Zone* zone, | 5115 LocationSummary* DoubleToSmiInstr::MakeLocationSummary(Zone* zone, |
5116 bool opt) const { | 5116 bool opt) const { |
5117 const intptr_t kNumInputs = 1; | 5117 const intptr_t kNumInputs = 1; |
5118 const intptr_t kNumTemps = 0; | 5118 const intptr_t kNumTemps = 0; |
5119 LocationSummary* result = new (zone) | 5119 LocationSummary* result = new (zone) |
5120 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall); | 5120 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6112 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), | 6112 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), |
6113 kGrowRegExpStackRuntimeEntry, 1, locs()); | 6113 kGrowRegExpStackRuntimeEntry, 1, locs()); |
6114 __ Drop(1); | 6114 __ Drop(1); |
6115 __ Pop(result); | 6115 __ Pop(result); |
6116 } | 6116 } |
6117 | 6117 |
6118 | 6118 |
6119 } // namespace dart | 6119 } // namespace dart |
6120 | 6120 |
6121 #endif // defined TARGET_ARCH_ARM64 | 6121 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |