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_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 (kFirstLocalSlotFromFp + 1 - compiler->StackSize()) * kWordSize; | 94 (kFirstLocalSlotFromFp + 1 - compiler->StackSize()) * kWordSize; |
95 ASSERT(fp_sp_dist <= 0); | 95 ASSERT(fp_sp_dist <= 0); |
96 __ subu(CMPRES1, SP, FP); | 96 __ subu(CMPRES1, SP, FP); |
97 | 97 |
98 __ BranchEqual(CMPRES1, fp_sp_dist, &stack_ok); | 98 __ BranchEqual(CMPRES1, fp_sp_dist, &stack_ok); |
99 __ break_(0); | 99 __ break_(0); |
100 | 100 |
101 __ Bind(&stack_ok); | 101 __ Bind(&stack_ok); |
102 } | 102 } |
103 #endif | 103 #endif |
104 // This sequence is patched by a debugger breakpoint. There is no need for | |
105 // extra NOP instructions here because the sequence patched in for a | |
106 // breakpoint is shorter than the sequence here. | |
107 __ LeaveDartFrameAndReturn(); | 104 __ LeaveDartFrameAndReturn(); |
108 compiler->AddCurrentDescriptor(PcDescriptors::kReturn, | |
109 Isolate::kNoDeoptId, | |
110 token_pos()); | |
111 } | 105 } |
112 | 106 |
113 | 107 |
114 static Condition NegateCondition(Condition condition) { | 108 static Condition NegateCondition(Condition condition) { |
115 switch (condition) { | 109 switch (condition) { |
116 case EQ: return NE; | 110 case EQ: return NE; |
117 case NE: return EQ; | 111 case NE: return EQ; |
118 case LT: return GE; | 112 case LT: return GE; |
119 case LE: return GT; | 113 case LE: return GT; |
120 case GT: return LE; | 114 case GT: return LE; |
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
779 __ LoadImmediate(T5, entry); | 773 __ LoadImmediate(T5, entry); |
780 __ LoadImmediate(A1, NativeArguments::ComputeArgcTag(function())); | 774 __ LoadImmediate(A1, NativeArguments::ComputeArgcTag(function())); |
781 compiler->GenerateCall(token_pos(), | 775 compiler->GenerateCall(token_pos(), |
782 stub_entry, | 776 stub_entry, |
783 PcDescriptors::kOther, | 777 PcDescriptors::kOther, |
784 locs()); | 778 locs()); |
785 __ Pop(result); | 779 __ Pop(result); |
786 } | 780 } |
787 | 781 |
788 | 782 |
| 783 LocationSummary* DebugStepCheckInstr::MakeLocationSummary(bool opt) const { |
| 784 const intptr_t kNumInputs = 0; |
| 785 const intptr_t kNumTemps = 0; |
| 786 LocationSummary* locs = |
| 787 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); |
| 788 return locs; |
| 789 } |
| 790 |
| 791 |
| 792 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 793 if (!compiler->is_optimizing()) { |
| 794 const ExternalLabel label("debug_step_check", |
| 795 StubCode::DebugStepCheckEntryPoint()); |
| 796 compiler->GenerateCall(token_pos(), |
| 797 &label, |
| 798 PcDescriptors::kReturn, |
| 799 locs()); |
| 800 } |
| 801 } |
| 802 |
| 803 |
| 804 Instruction* DebugStepCheckInstr::Canonicalize(FlowGraph* flow_graph) { |
| 805 if (compiler->is_optimizing()) { |
| 806 return NULL; |
| 807 } |
| 808 } |
| 809 |
| 810 |
789 LocationSummary* StringFromCharCodeInstr::MakeLocationSummary(bool opt) const { | 811 LocationSummary* StringFromCharCodeInstr::MakeLocationSummary(bool opt) const { |
790 const intptr_t kNumInputs = 1; | 812 const intptr_t kNumInputs = 1; |
791 // TODO(fschneider): Allow immediate operands for the char code. | 813 // TODO(fschneider): Allow immediate operands for the char code. |
792 return LocationSummary::Make(kNumInputs, | 814 return LocationSummary::Make(kNumInputs, |
793 Location::RequiresRegister(), | 815 Location::RequiresRegister(), |
794 LocationSummary::kNoCall); | 816 LocationSummary::kNoCall); |
795 } | 817 } |
796 | 818 |
797 | 819 |
798 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 820 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
(...skipping 3414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4213 compiler->GenerateCall(token_pos(), | 4235 compiler->GenerateCall(token_pos(), |
4214 &label, | 4236 &label, |
4215 PcDescriptors::kOther, | 4237 PcDescriptors::kOther, |
4216 locs()); | 4238 locs()); |
4217 __ Drop(2); // Discard type arguments and receiver. | 4239 __ Drop(2); // Discard type arguments and receiver. |
4218 } | 4240 } |
4219 | 4241 |
4220 } // namespace dart | 4242 } // namespace dart |
4221 | 4243 |
4222 #endif // defined TARGET_ARCH_MIPS | 4244 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |