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/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 // R4: Arguments descriptor. | 207 // R4: Arguments descriptor. |
208 // R0: Function. | 208 // R0: Function. |
209 ASSERT(locs()->in(0).reg() == R0); | 209 ASSERT(locs()->in(0).reg() == R0); |
210 __ LoadFieldFromOffset(R2, R0, Function::instructions_offset(), PP); | 210 __ LoadFieldFromOffset(R2, R0, Function::instructions_offset(), PP); |
211 | 211 |
212 // R2: instructions. | 212 // R2: instructions. |
213 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). | 213 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). |
214 __ LoadImmediate(R5, 0, PP); | 214 __ LoadImmediate(R5, 0, PP); |
215 __ AddImmediate(R2, R2, Instructions::HeaderSize() - kHeapObjectTag, PP); | 215 __ AddImmediate(R2, R2, Instructions::HeaderSize() - kHeapObjectTag, PP); |
216 __ blr(R2); | 216 __ blr(R2); |
217 compiler->AddCurrentDescriptor(PcDescriptors::kClosureCall, | 217 compiler->AddCurrentDescriptor(RawPcDescriptors::kClosureCall, |
218 deopt_id(), | 218 deopt_id(), |
219 token_pos()); | 219 token_pos()); |
220 compiler->RecordSafepoint(locs()); | 220 compiler->RecordSafepoint(locs()); |
221 // Marks either the continuation point in unoptimized code or the | 221 // Marks either the continuation point in unoptimized code or the |
222 // deoptimization point in optimized code, after call. | 222 // deoptimization point in optimized code, after call. |
223 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); | 223 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); |
224 if (compiler->is_optimizing()) { | 224 if (compiler->is_optimizing()) { |
225 compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos()); | 225 compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos()); |
226 } else { | 226 } else { |
227 // Add deoptimization continuation point after the call and before the | 227 // Add deoptimization continuation point after the call and before the |
228 // arguments are removed. | 228 // arguments are removed. |
229 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, | 229 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, |
230 deopt_id_after, | 230 deopt_id_after, |
231 token_pos()); | 231 token_pos()); |
232 } | 232 } |
233 __ Drop(argument_count); | 233 __ Drop(argument_count); |
234 } | 234 } |
235 | 235 |
236 | 236 |
237 LocationSummary* LoadLocalInstr::MakeLocationSummary(Isolate* isolate, | 237 LocationSummary* LoadLocalInstr::MakeLocationSummary(Isolate* isolate, |
238 bool opt) const { | 238 bool opt) const { |
239 return LocationSummary::Make(isolate, | 239 return LocationSummary::Make(isolate, |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 if (!function().IsNativeAutoSetupScope()) { | 789 if (!function().IsNativeAutoSetupScope()) { |
790 entry = Simulator::RedirectExternalReference( | 790 entry = Simulator::RedirectExternalReference( |
791 entry, Simulator::kBootstrapNativeCall, function().NumParameters()); | 791 entry, Simulator::kBootstrapNativeCall, function().NumParameters()); |
792 } | 792 } |
793 #endif | 793 #endif |
794 } | 794 } |
795 __ LoadImmediate(R5, entry, PP); | 795 __ LoadImmediate(R5, entry, PP); |
796 __ LoadImmediate(R1, argc_tag, PP); | 796 __ LoadImmediate(R1, argc_tag, PP); |
797 compiler->GenerateCall(token_pos(), | 797 compiler->GenerateCall(token_pos(), |
798 stub_entry, | 798 stub_entry, |
799 PcDescriptors::kOther, | 799 RawPcDescriptors::kOther, |
800 locs()); | 800 locs()); |
801 __ Pop(result); | 801 __ Pop(result); |
802 } | 802 } |
803 | 803 |
804 | 804 |
805 LocationSummary* StringFromCharCodeInstr::MakeLocationSummary(Isolate* isolate, | 805 LocationSummary* StringFromCharCodeInstr::MakeLocationSummary(Isolate* isolate, |
806 bool opt) const { | 806 bool opt) const { |
807 const intptr_t kNumInputs = 1; | 807 const intptr_t kNumInputs = 1; |
808 // TODO(fschneider): Allow immediate operands for the char code. | 808 // TODO(fschneider): Allow immediate operands for the char code. |
809 return LocationSummary::Make(isolate, | 809 return LocationSummary::Make(isolate, |
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1612 const Code& stub = | 1612 const Code& stub = |
1613 Code::Handle(StubCode::GetAllocationStubForClass(cls_)); | 1613 Code::Handle(StubCode::GetAllocationStubForClass(cls_)); |
1614 const ExternalLabel label(stub.EntryPoint()); | 1614 const ExternalLabel label(stub.EntryPoint()); |
1615 | 1615 |
1616 LocationSummary* locs = instruction_->locs(); | 1616 LocationSummary* locs = instruction_->locs(); |
1617 locs->live_registers()->Remove(locs->out(0)); | 1617 locs->live_registers()->Remove(locs->out(0)); |
1618 | 1618 |
1619 compiler->SaveLiveRegisters(locs); | 1619 compiler->SaveLiveRegisters(locs); |
1620 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. | 1620 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. |
1621 &label, | 1621 &label, |
1622 PcDescriptors::kOther, | 1622 RawPcDescriptors::kOther, |
1623 locs); | 1623 locs); |
1624 __ mov(locs->temp(0).reg(), R0); | 1624 __ mov(locs->temp(0).reg(), R0); |
1625 compiler->RestoreLiveRegisters(locs); | 1625 compiler->RestoreLiveRegisters(locs); |
1626 | 1626 |
1627 __ b(exit_label()); | 1627 __ b(exit_label()); |
1628 } | 1628 } |
1629 | 1629 |
1630 private: | 1630 private: |
1631 StoreInstanceFieldInstr* instruction_; | 1631 StoreInstanceFieldInstr* instruction_; |
1632 const Class& cls_; | 1632 const Class& cls_; |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1957 return locs; | 1957 return locs; |
1958 } | 1958 } |
1959 | 1959 |
1960 | 1960 |
1961 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1961 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
1962 // Allocate the array. R2 = length, R1 = element type. | 1962 // Allocate the array. R2 = length, R1 = element type. |
1963 ASSERT(locs()->in(kElementTypePos).reg() == R1); | 1963 ASSERT(locs()->in(kElementTypePos).reg() == R1); |
1964 ASSERT(locs()->in(kLengthPos).reg() == R2); | 1964 ASSERT(locs()->in(kLengthPos).reg() == R2); |
1965 compiler->GenerateCall(token_pos(), | 1965 compiler->GenerateCall(token_pos(), |
1966 &StubCode::AllocateArrayLabel(), | 1966 &StubCode::AllocateArrayLabel(), |
1967 PcDescriptors::kOther, | 1967 RawPcDescriptors::kOther, |
1968 locs()); | 1968 locs()); |
1969 ASSERT(locs()->out(0).reg() == R0); | 1969 ASSERT(locs()->out(0).reg() == R0); |
1970 } | 1970 } |
1971 | 1971 |
1972 | 1972 |
1973 class BoxDoubleSlowPath : public SlowPathCode { | 1973 class BoxDoubleSlowPath : public SlowPathCode { |
1974 public: | 1974 public: |
1975 explicit BoxDoubleSlowPath(Instruction* instruction) | 1975 explicit BoxDoubleSlowPath(Instruction* instruction) |
1976 : instruction_(instruction) { } | 1976 : instruction_(instruction) { } |
1977 | 1977 |
1978 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { | 1978 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
1979 __ Comment("BoxDoubleSlowPath"); | 1979 __ Comment("BoxDoubleSlowPath"); |
1980 __ Bind(entry_label()); | 1980 __ Bind(entry_label()); |
1981 const Class& double_class = compiler->double_class(); | 1981 const Class& double_class = compiler->double_class(); |
1982 const Code& stub = | 1982 const Code& stub = |
1983 Code::Handle(StubCode::GetAllocationStubForClass(double_class)); | 1983 Code::Handle(StubCode::GetAllocationStubForClass(double_class)); |
1984 const ExternalLabel label(stub.EntryPoint()); | 1984 const ExternalLabel label(stub.EntryPoint()); |
1985 | 1985 |
1986 LocationSummary* locs = instruction_->locs(); | 1986 LocationSummary* locs = instruction_->locs(); |
1987 locs->live_registers()->Remove(locs->out(0)); | 1987 locs->live_registers()->Remove(locs->out(0)); |
1988 | 1988 |
1989 compiler->SaveLiveRegisters(locs); | 1989 compiler->SaveLiveRegisters(locs); |
1990 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. | 1990 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. |
1991 &label, | 1991 &label, |
1992 PcDescriptors::kOther, | 1992 RawPcDescriptors::kOther, |
1993 locs); | 1993 locs); |
1994 __ mov(locs->out(0).reg(), R0); | 1994 __ mov(locs->out(0).reg(), R0); |
1995 compiler->RestoreLiveRegisters(locs); | 1995 compiler->RestoreLiveRegisters(locs); |
1996 | 1996 |
1997 __ b(exit_label()); | 1997 __ b(exit_label()); |
1998 } | 1998 } |
1999 | 1999 |
2000 private: | 2000 private: |
2001 Instruction* instruction_; | 2001 Instruction* instruction_; |
2002 }; | 2002 }; |
(...skipping 11 matching lines...) Expand all Loading... |
2014 const Code& stub = | 2014 const Code& stub = |
2015 Code::Handle(StubCode::GetAllocationStubForClass(float32x4_class)); | 2015 Code::Handle(StubCode::GetAllocationStubForClass(float32x4_class)); |
2016 const ExternalLabel label(stub.EntryPoint()); | 2016 const ExternalLabel label(stub.EntryPoint()); |
2017 | 2017 |
2018 LocationSummary* locs = instruction_->locs(); | 2018 LocationSummary* locs = instruction_->locs(); |
2019 locs->live_registers()->Remove(locs->out(0)); | 2019 locs->live_registers()->Remove(locs->out(0)); |
2020 | 2020 |
2021 compiler->SaveLiveRegisters(locs); | 2021 compiler->SaveLiveRegisters(locs); |
2022 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. | 2022 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. |
2023 &label, | 2023 &label, |
2024 PcDescriptors::kOther, | 2024 RawPcDescriptors::kOther, |
2025 locs); | 2025 locs); |
2026 __ mov(locs->out(0).reg(), R0); | 2026 __ mov(locs->out(0).reg(), R0); |
2027 compiler->RestoreLiveRegisters(locs); | 2027 compiler->RestoreLiveRegisters(locs); |
2028 | 2028 |
2029 __ b(exit_label()); | 2029 __ b(exit_label()); |
2030 } | 2030 } |
2031 | 2031 |
2032 private: | 2032 private: |
2033 Instruction* instruction_; | 2033 Instruction* instruction_; |
2034 }; | 2034 }; |
(...skipping 11 matching lines...) Expand all Loading... |
2046 const Code& stub = | 2046 const Code& stub = |
2047 Code::Handle(StubCode::GetAllocationStubForClass(float64x2_class)); | 2047 Code::Handle(StubCode::GetAllocationStubForClass(float64x2_class)); |
2048 const ExternalLabel label(stub.EntryPoint()); | 2048 const ExternalLabel label(stub.EntryPoint()); |
2049 | 2049 |
2050 LocationSummary* locs = instruction_->locs(); | 2050 LocationSummary* locs = instruction_->locs(); |
2051 locs->live_registers()->Remove(locs->out(0)); | 2051 locs->live_registers()->Remove(locs->out(0)); |
2052 | 2052 |
2053 compiler->SaveLiveRegisters(locs); | 2053 compiler->SaveLiveRegisters(locs); |
2054 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. | 2054 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. |
2055 &label, | 2055 &label, |
2056 PcDescriptors::kOther, | 2056 RawPcDescriptors::kOther, |
2057 locs); | 2057 locs); |
2058 __ mov(locs->out(0).reg(), R0); | 2058 __ mov(locs->out(0).reg(), R0); |
2059 compiler->RestoreLiveRegisters(locs); | 2059 compiler->RestoreLiveRegisters(locs); |
2060 | 2060 |
2061 __ b(exit_label()); | 2061 __ b(exit_label()); |
2062 } | 2062 } |
2063 | 2063 |
2064 private: | 2064 private: |
2065 Instruction* instruction_; | 2065 Instruction* instruction_; |
2066 }; | 2066 }; |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2322 | 2322 |
2323 | 2323 |
2324 void AllocateContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2324 void AllocateContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
2325 ASSERT(locs()->temp(0).reg() == R1); | 2325 ASSERT(locs()->temp(0).reg() == R1); |
2326 ASSERT(locs()->out(0).reg() == R0); | 2326 ASSERT(locs()->out(0).reg() == R0); |
2327 | 2327 |
2328 __ LoadImmediate(R1, num_context_variables(), PP); | 2328 __ LoadImmediate(R1, num_context_variables(), PP); |
2329 const ExternalLabel label(StubCode::AllocateContextEntryPoint()); | 2329 const ExternalLabel label(StubCode::AllocateContextEntryPoint()); |
2330 compiler->GenerateCall(token_pos(), | 2330 compiler->GenerateCall(token_pos(), |
2331 &label, | 2331 &label, |
2332 PcDescriptors::kOther, | 2332 RawPcDescriptors::kOther, |
2333 locs()); | 2333 locs()); |
2334 } | 2334 } |
2335 | 2335 |
2336 | 2336 |
2337 LocationSummary* CloneContextInstr::MakeLocationSummary(Isolate* isolate, | 2337 LocationSummary* CloneContextInstr::MakeLocationSummary(Isolate* isolate, |
2338 bool opt) const { | 2338 bool opt) const { |
2339 const intptr_t kNumInputs = 1; | 2339 const intptr_t kNumInputs = 1; |
2340 const intptr_t kNumTemps = 0; | 2340 const intptr_t kNumTemps = 0; |
2341 LocationSummary* locs = new(isolate) LocationSummary( | 2341 LocationSummary* locs = new(isolate) LocationSummary( |
2342 isolate, kNumInputs, kNumTemps, LocationSummary::kCall); | 2342 isolate, kNumInputs, kNumTemps, LocationSummary::kCall); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2435 Environment* env = compiler->SlowPathEnvironmentFor(instruction_); | 2435 Environment* env = compiler->SlowPathEnvironmentFor(instruction_); |
2436 compiler->pending_deoptimization_env_ = env; | 2436 compiler->pending_deoptimization_env_ = env; |
2437 compiler->GenerateRuntimeCall(instruction_->token_pos(), | 2437 compiler->GenerateRuntimeCall(instruction_->token_pos(), |
2438 instruction_->deopt_id(), | 2438 instruction_->deopt_id(), |
2439 kStackOverflowRuntimeEntry, | 2439 kStackOverflowRuntimeEntry, |
2440 0, | 2440 0, |
2441 instruction_->locs()); | 2441 instruction_->locs()); |
2442 | 2442 |
2443 if (FLAG_use_osr && !compiler->is_optimizing() && instruction_->in_loop()) { | 2443 if (FLAG_use_osr && !compiler->is_optimizing() && instruction_->in_loop()) { |
2444 // In unoptimized code, record loop stack checks as possible OSR entries. | 2444 // In unoptimized code, record loop stack checks as possible OSR entries. |
2445 compiler->AddCurrentDescriptor(PcDescriptors::kOsrEntry, | 2445 compiler->AddCurrentDescriptor(RawPcDescriptors::kOsrEntry, |
2446 instruction_->deopt_id(), | 2446 instruction_->deopt_id(), |
2447 0); // No token position. | 2447 0); // No token position. |
2448 } | 2448 } |
2449 compiler->pending_deoptimization_env_ = NULL; | 2449 compiler->pending_deoptimization_env_ = NULL; |
2450 compiler->RestoreLiveRegisters(instruction_->locs()); | 2450 compiler->RestoreLiveRegisters(instruction_->locs()); |
2451 __ b(exit_label()); | 2451 __ b(exit_label()); |
2452 } | 2452 } |
2453 | 2453 |
2454 Label* osr_entry_label() { | 2454 Label* osr_entry_label() { |
2455 ASSERT(FLAG_use_osr); | 2455 ASSERT(FLAG_use_osr); |
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3201 const Code& stub = | 3201 const Code& stub = |
3202 Code::Handle(StubCode::GetAllocationStubForClass(int32x4_class)); | 3202 Code::Handle(StubCode::GetAllocationStubForClass(int32x4_class)); |
3203 const ExternalLabel label(stub.EntryPoint()); | 3203 const ExternalLabel label(stub.EntryPoint()); |
3204 | 3204 |
3205 LocationSummary* locs = instruction_->locs(); | 3205 LocationSummary* locs = instruction_->locs(); |
3206 locs->live_registers()->Remove(locs->out(0)); | 3206 locs->live_registers()->Remove(locs->out(0)); |
3207 | 3207 |
3208 compiler->SaveLiveRegisters(locs); | 3208 compiler->SaveLiveRegisters(locs); |
3209 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. | 3209 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. |
3210 &label, | 3210 &label, |
3211 PcDescriptors::kOther, | 3211 RawPcDescriptors::kOther, |
3212 locs); | 3212 locs); |
3213 __ mov(locs->out(0).reg(), R0); | 3213 __ mov(locs->out(0).reg(), R0); |
3214 compiler->RestoreLiveRegisters(locs); | 3214 compiler->RestoreLiveRegisters(locs); |
3215 | 3215 |
3216 __ b(exit_label()); | 3216 __ b(exit_label()); |
3217 } | 3217 } |
3218 | 3218 |
3219 private: | 3219 private: |
3220 BoxInt32x4Instr* instruction_; | 3220 BoxInt32x4Instr* instruction_; |
3221 }; | 3221 }; |
(...skipping 1939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5161 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5161 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
5162 __ Bind(compiler->GetJumpLabel(this)); | 5162 __ Bind(compiler->GetJumpLabel(this)); |
5163 if (!compiler->is_optimizing()) { | 5163 if (!compiler->is_optimizing()) { |
5164 if (compiler->NeedsEdgeCounter(this)) { | 5164 if (compiler->NeedsEdgeCounter(this)) { |
5165 compiler->EmitEdgeCounter(); | 5165 compiler->EmitEdgeCounter(); |
5166 } | 5166 } |
5167 // Add an edge counter. | 5167 // Add an edge counter. |
5168 // On ARM64 the deoptimization descriptor points after the edge counter | 5168 // On ARM64 the deoptimization descriptor points after the edge counter |
5169 // code so that we can reuse the same pattern matching code as at call | 5169 // code so that we can reuse the same pattern matching code as at call |
5170 // sites, which matches backwards from the end of the pattern. | 5170 // sites, which matches backwards from the end of the pattern. |
5171 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, | 5171 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, |
5172 deopt_id_, | 5172 deopt_id_, |
5173 Scanner::kNoSourcePos); | 5173 Scanner::kNoSourcePos); |
5174 } | 5174 } |
5175 if (HasParallelMove()) { | 5175 if (HasParallelMove()) { |
5176 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); | 5176 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); |
5177 } | 5177 } |
5178 } | 5178 } |
5179 | 5179 |
5180 | 5180 |
5181 LocationSummary* GotoInstr::MakeLocationSummary(Isolate* isolate, | 5181 LocationSummary* GotoInstr::MakeLocationSummary(Isolate* isolate, |
5182 bool opt) const { | 5182 bool opt) const { |
5183 return new(isolate) LocationSummary(isolate, 0, 0, LocationSummary::kNoCall); | 5183 return new(isolate) LocationSummary(isolate, 0, 0, LocationSummary::kNoCall); |
5184 } | 5184 } |
5185 | 5185 |
5186 | 5186 |
5187 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5187 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
5188 if (!compiler->is_optimizing()) { | 5188 if (!compiler->is_optimizing()) { |
5189 if (FLAG_emit_edge_counters) { | 5189 if (FLAG_emit_edge_counters) { |
5190 compiler->EmitEdgeCounter(); | 5190 compiler->EmitEdgeCounter(); |
5191 } | 5191 } |
5192 // Add a deoptimization descriptor for deoptimizing instructions that | 5192 // Add a deoptimization descriptor for deoptimizing instructions that |
5193 // may be inserted before this instruction. On ARM64 this descriptor | 5193 // may be inserted before this instruction. On ARM64 this descriptor |
5194 // points after the edge counter code so that we can reuse the same | 5194 // points after the edge counter code so that we can reuse the same |
5195 // pattern matching code as at call sites, which matches backwards from | 5195 // pattern matching code as at call sites, which matches backwards from |
5196 // the end of the pattern. | 5196 // the end of the pattern. |
5197 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, | 5197 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, |
5198 GetDeoptId(), | 5198 GetDeoptId(), |
5199 Scanner::kNoSourcePos); | 5199 Scanner::kNoSourcePos); |
5200 } | 5200 } |
5201 if (HasParallelMove()) { | 5201 if (HasParallelMove()) { |
5202 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); | 5202 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); |
5203 } | 5203 } |
5204 | 5204 |
5205 // We can fall through if the successor is the next block in the list. | 5205 // We can fall through if the successor is the next block in the list. |
5206 // Otherwise, we need a jump. | 5206 // Otherwise, we need a jump. |
5207 if (!compiler->CanFallThroughTo(successor())) { | 5207 if (!compiler->CanFallThroughTo(successor())) { |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5329 bool opt) const { | 5329 bool opt) const { |
5330 return MakeCallSummary(); | 5330 return MakeCallSummary(); |
5331 } | 5331 } |
5332 | 5332 |
5333 | 5333 |
5334 void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5334 void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
5335 const Code& stub = Code::Handle(StubCode::GetAllocationStubForClass(cls())); | 5335 const Code& stub = Code::Handle(StubCode::GetAllocationStubForClass(cls())); |
5336 const ExternalLabel label(stub.EntryPoint()); | 5336 const ExternalLabel label(stub.EntryPoint()); |
5337 compiler->GenerateCall(token_pos(), | 5337 compiler->GenerateCall(token_pos(), |
5338 &label, | 5338 &label, |
5339 PcDescriptors::kOther, | 5339 RawPcDescriptors::kOther, |
5340 locs()); | 5340 locs()); |
5341 __ Drop(ArgumentCount()); // Discard arguments. | 5341 __ Drop(ArgumentCount()); // Discard arguments. |
5342 } | 5342 } |
5343 | 5343 |
5344 | 5344 |
5345 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5345 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
5346 ASSERT(!compiler->is_optimizing()); | 5346 ASSERT(!compiler->is_optimizing()); |
5347 const ExternalLabel label(StubCode::DebugStepCheckEntryPoint()); | 5347 const ExternalLabel label(StubCode::DebugStepCheckEntryPoint()); |
5348 __ LoadImmediate(R4, 0, kNoPP); | 5348 __ LoadImmediate(R4, 0, kNoPP); |
5349 __ LoadImmediate(R5, 0, kNoPP); | 5349 __ LoadImmediate(R5, 0, kNoPP); |
5350 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); | 5350 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); |
5351 #if defined(DEBUG) | 5351 #if defined(DEBUG) |
5352 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP); | 5352 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP); |
5353 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP); | 5353 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP); |
5354 #endif | 5354 #endif |
5355 } | 5355 } |
5356 | 5356 |
5357 } // namespace dart | 5357 } // namespace dart |
5358 | 5358 |
5359 #endif // defined TARGET_ARCH_ARM64 | 5359 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |