OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
7 | 7 |
8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 | 9 |
10 #include "lib/error.h" | 10 #include "lib/error.h" |
(...skipping 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1741 return summary; | 1741 return summary; |
1742 } | 1742 } |
1743 | 1743 |
1744 | 1744 |
1745 class CheckStackOverflowSlowPath : public SlowPathCode { | 1745 class CheckStackOverflowSlowPath : public SlowPathCode { |
1746 public: | 1746 public: |
1747 explicit CheckStackOverflowSlowPath(CheckStackOverflowInstr* instruction) | 1747 explicit CheckStackOverflowSlowPath(CheckStackOverflowInstr* instruction) |
1748 : instruction_(instruction) { } | 1748 : instruction_(instruction) { } |
1749 | 1749 |
1750 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { | 1750 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1751 __ Comment("CheckStackOverflowSlowPath"); |
1751 __ Bind(entry_label()); | 1752 __ Bind(entry_label()); |
1752 compiler->SaveLiveRegisters(instruction_->locs()); | 1753 compiler->SaveLiveRegisters(instruction_->locs()); |
1753 compiler->GenerateCallRuntime(instruction_->token_pos(), | 1754 compiler->GenerateCallRuntime(instruction_->token_pos(), |
1754 kStackOverflowRuntimeEntry, | 1755 kStackOverflowRuntimeEntry, |
1755 instruction_->locs()); | 1756 instruction_->locs()); |
1756 compiler->RestoreLiveRegisters(instruction_->locs()); | 1757 compiler->RestoreLiveRegisters(instruction_->locs()); |
1757 __ jmp(exit_label()); | 1758 __ jmp(exit_label()); |
1758 } | 1759 } |
1759 | 1760 |
1760 private: | 1761 private: |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2077 return summary; | 2078 return summary; |
2078 } | 2079 } |
2079 | 2080 |
2080 | 2081 |
2081 class BoxDoubleSlowPath : public SlowPathCode { | 2082 class BoxDoubleSlowPath : public SlowPathCode { |
2082 public: | 2083 public: |
2083 explicit BoxDoubleSlowPath(BoxDoubleInstr* instruction) | 2084 explicit BoxDoubleSlowPath(BoxDoubleInstr* instruction) |
2084 : instruction_(instruction) { } | 2085 : instruction_(instruction) { } |
2085 | 2086 |
2086 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { | 2087 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2088 __ Comment("BoxDoubleSlowPath"); |
2087 __ Bind(entry_label()); | 2089 __ Bind(entry_label()); |
2088 const Class& double_class = compiler->double_class(); | 2090 const Class& double_class = compiler->double_class(); |
2089 const Code& stub = | 2091 const Code& stub = |
2090 Code::Handle(StubCode::GetAllocationStubForClass(double_class)); | 2092 Code::Handle(StubCode::GetAllocationStubForClass(double_class)); |
2091 const ExternalLabel label(double_class.ToCString(), stub.EntryPoint()); | 2093 const ExternalLabel label(double_class.ToCString(), stub.EntryPoint()); |
2092 | 2094 |
2093 LocationSummary* locs = instruction_->locs(); | 2095 LocationSummary* locs = instruction_->locs(); |
2094 locs->live_registers()->Remove(locs->out()); | 2096 locs->live_registers()->Remove(locs->out()); |
2095 | 2097 |
2096 compiler->SaveLiveRegisters(locs); | 2098 compiler->SaveLiveRegisters(locs); |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2553 return summary; | 2555 return summary; |
2554 } | 2556 } |
2555 | 2557 |
2556 | 2558 |
2557 class BoxIntegerSlowPath : public SlowPathCode { | 2559 class BoxIntegerSlowPath : public SlowPathCode { |
2558 public: | 2560 public: |
2559 explicit BoxIntegerSlowPath(BoxIntegerInstr* instruction) | 2561 explicit BoxIntegerSlowPath(BoxIntegerInstr* instruction) |
2560 : instruction_(instruction) { } | 2562 : instruction_(instruction) { } |
2561 | 2563 |
2562 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { | 2564 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2565 __ Comment("BoxIntegerSlowPath"); |
2563 __ Bind(entry_label()); | 2566 __ Bind(entry_label()); |
2564 const Class& mint_class = | 2567 const Class& mint_class = |
2565 Class::ZoneHandle(Isolate::Current()->object_store()->mint_class()); | 2568 Class::ZoneHandle(Isolate::Current()->object_store()->mint_class()); |
2566 const Code& stub = | 2569 const Code& stub = |
2567 Code::Handle(StubCode::GetAllocationStubForClass(mint_class)); | 2570 Code::Handle(StubCode::GetAllocationStubForClass(mint_class)); |
2568 const ExternalLabel label(mint_class.ToCString(), stub.EntryPoint()); | 2571 const ExternalLabel label(mint_class.ToCString(), stub.EntryPoint()); |
2569 | 2572 |
2570 LocationSummary* locs = instruction_->locs(); | 2573 LocationSummary* locs = instruction_->locs(); |
2571 locs->live_registers()->Remove(locs->out()); | 2574 locs->live_registers()->Remove(locs->out()); |
2572 | 2575 |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2790 __ pcmpeqq(XMM0, XMM0); // Generate all 1's. | 2793 __ pcmpeqq(XMM0, XMM0); // Generate all 1's. |
2791 __ pxor(value, XMM0); | 2794 __ pxor(value, XMM0); |
2792 } | 2795 } |
2793 | 2796 |
2794 | 2797 |
2795 } // namespace dart | 2798 } // namespace dart |
2796 | 2799 |
2797 #undef __ | 2800 #undef __ |
2798 | 2801 |
2799 #endif // defined TARGET_ARCH_X64 | 2802 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |