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/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1548 : instruction_(instruction), cls_(cls) { } | 1548 : instruction_(instruction), cls_(cls) { } |
1549 | 1549 |
1550 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { | 1550 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
1551 __ Comment("StoreInstanceFieldSlowPath"); | 1551 __ Comment("StoreInstanceFieldSlowPath"); |
1552 __ Bind(entry_label()); | 1552 __ Bind(entry_label()); |
1553 const Code& stub = | 1553 const Code& stub = |
1554 Code::Handle(StubCode::GetAllocationStubForClass(cls_)); | 1554 Code::Handle(StubCode::GetAllocationStubForClass(cls_)); |
1555 const ExternalLabel label(stub.EntryPoint()); | 1555 const ExternalLabel label(stub.EntryPoint()); |
1556 | 1556 |
1557 LocationSummary* locs = instruction_->locs(); | 1557 LocationSummary* locs = instruction_->locs(); |
1558 locs->live_registers()->Remove(locs->out(0)); | 1558 locs->live_registers()->Remove(locs->temp(0)); |
1559 | 1559 |
1560 compiler->SaveLiveRegisters(locs); | 1560 compiler->SaveLiveRegisters(locs); |
1561 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. | 1561 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. |
1562 &label, | 1562 &label, |
1563 RawPcDescriptors::kOther, | 1563 RawPcDescriptors::kOther, |
1564 locs); | 1564 locs); |
1565 __ MoveRegister(locs->temp(0).reg(), RAX); | 1565 __ MoveRegister(locs->temp(0).reg(), RAX); |
1566 compiler->RestoreLiveRegisters(locs); | 1566 compiler->RestoreLiveRegisters(locs); |
1567 | 1567 |
1568 __ jmp(exit_label()); | 1568 __ jmp(exit_label()); |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2033 | 2033 |
2034 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { | 2034 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
2035 __ Comment("BoxDoubleSlowPath"); | 2035 __ Comment("BoxDoubleSlowPath"); |
2036 __ Bind(entry_label()); | 2036 __ Bind(entry_label()); |
2037 const Class& double_class = compiler->double_class(); | 2037 const Class& double_class = compiler->double_class(); |
2038 const Code& stub = | 2038 const Code& stub = |
2039 Code::Handle(StubCode::GetAllocationStubForClass(double_class)); | 2039 Code::Handle(StubCode::GetAllocationStubForClass(double_class)); |
2040 const ExternalLabel label(stub.EntryPoint()); | 2040 const ExternalLabel label(stub.EntryPoint()); |
2041 | 2041 |
2042 LocationSummary* locs = instruction_->locs(); | 2042 LocationSummary* locs = instruction_->locs(); |
2043 locs->live_registers()->Remove(locs->out(0)); | 2043 ASSERT(!locs->live_registers()->Contains(locs->out(0))); |
2044 | 2044 |
2045 compiler->SaveLiveRegisters(locs); | 2045 compiler->SaveLiveRegisters(locs); |
2046 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. | 2046 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. |
2047 &label, | 2047 &label, |
2048 RawPcDescriptors::kOther, | 2048 RawPcDescriptors::kOther, |
2049 locs); | 2049 locs); |
2050 __ MoveRegister(locs->out(0).reg(), RAX); | 2050 __ MoveRegister(locs->out(0).reg(), RAX); |
2051 compiler->RestoreLiveRegisters(locs); | 2051 compiler->RestoreLiveRegisters(locs); |
2052 | 2052 |
2053 __ jmp(exit_label()); | 2053 __ jmp(exit_label()); |
(...skipping 11 matching lines...) Expand all Loading... |
2065 | 2065 |
2066 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { | 2066 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
2067 __ Comment("BoxFloat32x4SlowPath"); | 2067 __ Comment("BoxFloat32x4SlowPath"); |
2068 __ Bind(entry_label()); | 2068 __ Bind(entry_label()); |
2069 const Class& float32x4_class = compiler->float32x4_class(); | 2069 const Class& float32x4_class = compiler->float32x4_class(); |
2070 const Code& stub = | 2070 const Code& stub = |
2071 Code::Handle(StubCode::GetAllocationStubForClass(float32x4_class)); | 2071 Code::Handle(StubCode::GetAllocationStubForClass(float32x4_class)); |
2072 const ExternalLabel label(stub.EntryPoint()); | 2072 const ExternalLabel label(stub.EntryPoint()); |
2073 | 2073 |
2074 LocationSummary* locs = instruction_->locs(); | 2074 LocationSummary* locs = instruction_->locs(); |
2075 locs->live_registers()->Remove(locs->out(0)); | 2075 ASSERT(!locs->live_registers()->Contains(locs->out(0))); |
2076 | 2076 |
2077 compiler->SaveLiveRegisters(locs); | 2077 compiler->SaveLiveRegisters(locs); |
2078 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. | 2078 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. |
2079 &label, | 2079 &label, |
2080 RawPcDescriptors::kOther, | 2080 RawPcDescriptors::kOther, |
2081 locs); | 2081 locs); |
2082 __ MoveRegister(locs->out(0).reg(), RAX); | 2082 __ MoveRegister(locs->out(0).reg(), RAX); |
2083 compiler->RestoreLiveRegisters(locs); | 2083 compiler->RestoreLiveRegisters(locs); |
2084 | 2084 |
2085 __ jmp(exit_label()); | 2085 __ jmp(exit_label()); |
(...skipping 11 matching lines...) Expand all Loading... |
2097 | 2097 |
2098 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { | 2098 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
2099 __ Comment("BoxFloat64x2SlowPath"); | 2099 __ Comment("BoxFloat64x2SlowPath"); |
2100 __ Bind(entry_label()); | 2100 __ Bind(entry_label()); |
2101 const Class& float64x2_class = compiler->float64x2_class(); | 2101 const Class& float64x2_class = compiler->float64x2_class(); |
2102 const Code& stub = | 2102 const Code& stub = |
2103 Code::Handle(StubCode::GetAllocationStubForClass(float64x2_class)); | 2103 Code::Handle(StubCode::GetAllocationStubForClass(float64x2_class)); |
2104 const ExternalLabel label(stub.EntryPoint()); | 2104 const ExternalLabel label(stub.EntryPoint()); |
2105 | 2105 |
2106 LocationSummary* locs = instruction_->locs(); | 2106 LocationSummary* locs = instruction_->locs(); |
2107 locs->live_registers()->Remove(locs->out(0)); | 2107 ASSERT(!locs->live_registers()->Contains(locs->out(0))); |
2108 | 2108 |
2109 compiler->SaveLiveRegisters(locs); | 2109 compiler->SaveLiveRegisters(locs); |
2110 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. | 2110 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. |
2111 &label, | 2111 &label, |
2112 RawPcDescriptors::kOther, | 2112 RawPcDescriptors::kOther, |
2113 locs); | 2113 locs); |
2114 __ MoveRegister(locs->out(0).reg(), RAX); | 2114 __ MoveRegister(locs->out(0).reg(), RAX); |
2115 compiler->RestoreLiveRegisters(locs); | 2115 compiler->RestoreLiveRegisters(locs); |
2116 | 2116 |
2117 __ jmp(exit_label()); | 2117 __ jmp(exit_label()); |
(...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3427 | 3427 |
3428 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { | 3428 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
3429 __ Comment("BoxInt32x4SlowPath"); | 3429 __ Comment("BoxInt32x4SlowPath"); |
3430 __ Bind(entry_label()); | 3430 __ Bind(entry_label()); |
3431 const Class& int32x4_class = compiler->int32x4_class(); | 3431 const Class& int32x4_class = compiler->int32x4_class(); |
3432 const Code& stub = | 3432 const Code& stub = |
3433 Code::Handle(StubCode::GetAllocationStubForClass(int32x4_class)); | 3433 Code::Handle(StubCode::GetAllocationStubForClass(int32x4_class)); |
3434 const ExternalLabel label(stub.EntryPoint()); | 3434 const ExternalLabel label(stub.EntryPoint()); |
3435 | 3435 |
3436 LocationSummary* locs = instruction_->locs(); | 3436 LocationSummary* locs = instruction_->locs(); |
3437 locs->live_registers()->Remove(locs->out(0)); | 3437 ASSERT(!locs->live_registers()->Contains(locs->out(0))); |
3438 | 3438 |
3439 compiler->SaveLiveRegisters(locs); | 3439 compiler->SaveLiveRegisters(locs); |
3440 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. | 3440 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. |
3441 &label, | 3441 &label, |
3442 RawPcDescriptors::kOther, | 3442 RawPcDescriptors::kOther, |
3443 locs); | 3443 locs); |
3444 __ MoveRegister(locs->out(0).reg(), RAX); | 3444 __ MoveRegister(locs->out(0).reg(), RAX); |
3445 compiler->RestoreLiveRegisters(locs); | 3445 compiler->RestoreLiveRegisters(locs); |
3446 | 3446 |
3447 __ jmp(exit_label()); | 3447 __ jmp(exit_label()); |
(...skipping 2393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5841 __ movq(R10, Immediate(kInvalidObjectPointer)); | 5841 __ movq(R10, Immediate(kInvalidObjectPointer)); |
5842 __ movq(RBX, Immediate(kInvalidObjectPointer)); | 5842 __ movq(RBX, Immediate(kInvalidObjectPointer)); |
5843 #endif | 5843 #endif |
5844 } | 5844 } |
5845 | 5845 |
5846 } // namespace dart | 5846 } // namespace dart |
5847 | 5847 |
5848 #undef __ | 5848 #undef __ |
5849 | 5849 |
5850 #endif // defined TARGET_ARCH_X64 | 5850 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |