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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
7 | 7 |
8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 | 9 |
10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 1908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1919 | 1919 |
1920 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { | 1920 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
1921 __ Comment("StoreInstanceFieldSlowPath"); | 1921 __ Comment("StoreInstanceFieldSlowPath"); |
1922 __ Bind(entry_label()); | 1922 __ Bind(entry_label()); |
1923 | 1923 |
1924 const Code& stub = | 1924 const Code& stub = |
1925 Code::Handle(StubCode::GetAllocationStubForClass(cls_)); | 1925 Code::Handle(StubCode::GetAllocationStubForClass(cls_)); |
1926 const ExternalLabel label(stub.EntryPoint()); | 1926 const ExternalLabel label(stub.EntryPoint()); |
1927 | 1927 |
1928 LocationSummary* locs = instruction_->locs(); | 1928 LocationSummary* locs = instruction_->locs(); |
1929 locs->live_registers()->Remove(locs->out(0)); | 1929 locs->live_registers()->Remove(locs->temp(0)); |
1930 | 1930 |
1931 compiler->SaveLiveRegisters(locs); | 1931 compiler->SaveLiveRegisters(locs); |
1932 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. | 1932 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. |
1933 &label, | 1933 &label, |
1934 RawPcDescriptors::kOther, | 1934 RawPcDescriptors::kOther, |
1935 locs); | 1935 locs); |
1936 __ MoveRegister(locs->temp(0).reg(), R0); | 1936 __ MoveRegister(locs->temp(0).reg(), R0); |
1937 compiler->RestoreLiveRegisters(locs); | 1937 compiler->RestoreLiveRegisters(locs); |
1938 | 1938 |
1939 __ b(exit_label()); | 1939 __ b(exit_label()); |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2393 | 2393 |
2394 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { | 2394 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
2395 __ Comment("BoxDoubleSlowPath"); | 2395 __ Comment("BoxDoubleSlowPath"); |
2396 __ Bind(entry_label()); | 2396 __ Bind(entry_label()); |
2397 const Class& double_class = compiler->double_class(); | 2397 const Class& double_class = compiler->double_class(); |
2398 const Code& stub = | 2398 const Code& stub = |
2399 Code::Handle(StubCode::GetAllocationStubForClass(double_class)); | 2399 Code::Handle(StubCode::GetAllocationStubForClass(double_class)); |
2400 const ExternalLabel label(stub.EntryPoint()); | 2400 const ExternalLabel label(stub.EntryPoint()); |
2401 | 2401 |
2402 LocationSummary* locs = instruction_->locs(); | 2402 LocationSummary* locs = instruction_->locs(); |
2403 locs->live_registers()->Remove(locs->out(0)); | 2403 ASSERT(!locs->live_registers()->Contains(locs->out(0))); |
2404 | 2404 |
2405 compiler->SaveLiveRegisters(locs); | 2405 compiler->SaveLiveRegisters(locs); |
2406 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. | 2406 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. |
2407 &label, | 2407 &label, |
2408 RawPcDescriptors::kOther, | 2408 RawPcDescriptors::kOther, |
2409 locs); | 2409 locs); |
2410 __ MoveRegister(locs->out(0).reg(), R0); | 2410 __ MoveRegister(locs->out(0).reg(), R0); |
2411 compiler->RestoreLiveRegisters(locs); | 2411 compiler->RestoreLiveRegisters(locs); |
2412 | 2412 |
2413 __ b(exit_label()); | 2413 __ b(exit_label()); |
(...skipping 11 matching lines...) Expand all Loading... |
2425 | 2425 |
2426 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { | 2426 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
2427 __ Comment("BoxFloat32x4SlowPath"); | 2427 __ Comment("BoxFloat32x4SlowPath"); |
2428 __ Bind(entry_label()); | 2428 __ Bind(entry_label()); |
2429 const Class& float32x4_class = compiler->float32x4_class(); | 2429 const Class& float32x4_class = compiler->float32x4_class(); |
2430 const Code& stub = | 2430 const Code& stub = |
2431 Code::Handle(StubCode::GetAllocationStubForClass(float32x4_class)); | 2431 Code::Handle(StubCode::GetAllocationStubForClass(float32x4_class)); |
2432 const ExternalLabel label(stub.EntryPoint()); | 2432 const ExternalLabel label(stub.EntryPoint()); |
2433 | 2433 |
2434 LocationSummary* locs = instruction_->locs(); | 2434 LocationSummary* locs = instruction_->locs(); |
2435 locs->live_registers()->Remove(locs->out(0)); | 2435 ASSERT(!locs->live_registers()->Contains(locs->out(0))); |
2436 | 2436 |
2437 compiler->SaveLiveRegisters(locs); | 2437 compiler->SaveLiveRegisters(locs); |
2438 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. | 2438 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. |
2439 &label, | 2439 &label, |
2440 RawPcDescriptors::kOther, | 2440 RawPcDescriptors::kOther, |
2441 locs); | 2441 locs); |
2442 __ mov(locs->out(0).reg(), Operand(R0)); | 2442 __ mov(locs->out(0).reg(), Operand(R0)); |
2443 compiler->RestoreLiveRegisters(locs); | 2443 compiler->RestoreLiveRegisters(locs); |
2444 | 2444 |
2445 __ b(exit_label()); | 2445 __ b(exit_label()); |
(...skipping 11 matching lines...) Expand all Loading... |
2457 | 2457 |
2458 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { | 2458 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
2459 __ Comment("BoxFloat64x2SlowPath"); | 2459 __ Comment("BoxFloat64x2SlowPath"); |
2460 __ Bind(entry_label()); | 2460 __ Bind(entry_label()); |
2461 const Class& float64x2_class = compiler->float64x2_class(); | 2461 const Class& float64x2_class = compiler->float64x2_class(); |
2462 const Code& stub = | 2462 const Code& stub = |
2463 Code::Handle(StubCode::GetAllocationStubForClass(float64x2_class)); | 2463 Code::Handle(StubCode::GetAllocationStubForClass(float64x2_class)); |
2464 const ExternalLabel label(stub.EntryPoint()); | 2464 const ExternalLabel label(stub.EntryPoint()); |
2465 | 2465 |
2466 LocationSummary* locs = instruction_->locs(); | 2466 LocationSummary* locs = instruction_->locs(); |
2467 locs->live_registers()->Remove(locs->out(0)); | 2467 ASSERT(!locs->live_registers()->Contains(locs->out(0))); |
2468 | 2468 |
2469 compiler->SaveLiveRegisters(locs); | 2469 compiler->SaveLiveRegisters(locs); |
2470 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. | 2470 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. |
2471 &label, | 2471 &label, |
2472 RawPcDescriptors::kOther, | 2472 RawPcDescriptors::kOther, |
2473 locs); | 2473 locs); |
2474 __ mov(locs->out(0).reg(), Operand(R0)); | 2474 __ mov(locs->out(0).reg(), Operand(R0)); |
2475 compiler->RestoreLiveRegisters(locs); | 2475 compiler->RestoreLiveRegisters(locs); |
2476 | 2476 |
2477 __ b(exit_label()); | 2477 __ b(exit_label()); |
(...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3693 | 3693 |
3694 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { | 3694 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
3695 __ Comment("BoxInt32x4SlowPath"); | 3695 __ Comment("BoxInt32x4SlowPath"); |
3696 __ Bind(entry_label()); | 3696 __ Bind(entry_label()); |
3697 const Class& int32x4_class = compiler->int32x4_class(); | 3697 const Class& int32x4_class = compiler->int32x4_class(); |
3698 const Code& stub = | 3698 const Code& stub = |
3699 Code::Handle(StubCode::GetAllocationStubForClass(int32x4_class)); | 3699 Code::Handle(StubCode::GetAllocationStubForClass(int32x4_class)); |
3700 const ExternalLabel label(stub.EntryPoint()); | 3700 const ExternalLabel label(stub.EntryPoint()); |
3701 | 3701 |
3702 LocationSummary* locs = instruction_->locs(); | 3702 LocationSummary* locs = instruction_->locs(); |
3703 locs->live_registers()->Remove(locs->out(0)); | 3703 ASSERT(!locs->live_registers()->Contains(locs->out(0))); |
3704 | 3704 |
3705 compiler->SaveLiveRegisters(locs); | 3705 compiler->SaveLiveRegisters(locs); |
3706 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. | 3706 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. |
3707 &label, | 3707 &label, |
3708 RawPcDescriptors::kOther, | 3708 RawPcDescriptors::kOther, |
3709 locs); | 3709 locs); |
3710 __ mov(locs->out(0).reg(), Operand(R0)); | 3710 __ mov(locs->out(0).reg(), Operand(R0)); |
3711 compiler->RestoreLiveRegisters(locs); | 3711 compiler->RestoreLiveRegisters(locs); |
3712 | 3712 |
3713 __ b(exit_label()); | 3713 __ b(exit_label()); |
(...skipping 2199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5913 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { | 5913 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
5914 __ Comment("BoxIntegerSlowPath"); | 5914 __ Comment("BoxIntegerSlowPath"); |
5915 __ Bind(entry_label()); | 5915 __ Bind(entry_label()); |
5916 const Class& mint_class = | 5916 const Class& mint_class = |
5917 Class::ZoneHandle(Isolate::Current()->object_store()->mint_class()); | 5917 Class::ZoneHandle(Isolate::Current()->object_store()->mint_class()); |
5918 const Code& stub = | 5918 const Code& stub = |
5919 Code::Handle(StubCode::GetAllocationStubForClass(mint_class)); | 5919 Code::Handle(StubCode::GetAllocationStubForClass(mint_class)); |
5920 const ExternalLabel label(stub.EntryPoint()); | 5920 const ExternalLabel label(stub.EntryPoint()); |
5921 | 5921 |
5922 LocationSummary* locs = instruction_->locs(); | 5922 LocationSummary* locs = instruction_->locs(); |
5923 locs->live_registers()->Remove(locs->out(0)); | 5923 ASSERT(!locs->live_registers()->Contains(locs->out(0))); |
5924 | 5924 |
5925 compiler->SaveLiveRegisters(locs); | 5925 compiler->SaveLiveRegisters(locs); |
5926 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. | 5926 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. |
5927 &label, | 5927 &label, |
5928 RawPcDescriptors::kOther, | 5928 RawPcDescriptors::kOther, |
5929 locs); | 5929 locs); |
5930 __ mov(locs->out(0).reg(), Operand(R0)); | 5930 __ mov(locs->out(0).reg(), Operand(R0)); |
5931 compiler->RestoreLiveRegisters(locs); | 5931 compiler->RestoreLiveRegisters(locs); |
5932 | 5932 |
5933 __ b(exit_label()); | 5933 __ b(exit_label()); |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6435 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); | 6435 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); |
6436 #if defined(DEBUG) | 6436 #if defined(DEBUG) |
6437 __ LoadImmediate(R4, kInvalidObjectPointer); | 6437 __ LoadImmediate(R4, kInvalidObjectPointer); |
6438 __ LoadImmediate(R5, kInvalidObjectPointer); | 6438 __ LoadImmediate(R5, kInvalidObjectPointer); |
6439 #endif | 6439 #endif |
6440 } | 6440 } |
6441 | 6441 |
6442 } // namespace dart | 6442 } // namespace dart |
6443 | 6443 |
6444 #endif // defined TARGET_ARCH_ARM | 6444 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |