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 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1253 } | 1253 } |
1254 break; | 1254 break; |
1255 default: | 1255 default: |
1256 ASSERT((class_id() == kArrayCid) || (class_id() == kImmutableArrayCid)); | 1256 ASSERT((class_id() == kArrayCid) || (class_id() == kImmutableArrayCid)); |
1257 __ lw(result, element_address); | 1257 __ lw(result, element_address); |
1258 break; | 1258 break; |
1259 } | 1259 } |
1260 } | 1260 } |
1261 | 1261 |
1262 | 1262 |
| 1263 CompileType LoadCodeUnitsInstr::ComputeType() const { |
| 1264 UNIMPLEMENTED(); |
| 1265 return CompileType::Dynamic(); |
| 1266 } |
| 1267 |
| 1268 |
| 1269 Representation LoadCodeUnitsInstr::representation() const { |
| 1270 UNIMPLEMENTED(); |
| 1271 return kTagged; |
| 1272 } |
| 1273 |
| 1274 |
| 1275 LocationSummary* LoadCodeUnitsInstr::MakeLocationSummary(Isolate* isolate, |
| 1276 bool opt) const { |
| 1277 UNIMPLEMENTED(); |
| 1278 return NULL; |
| 1279 } |
| 1280 |
| 1281 |
| 1282 void LoadCodeUnitsInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1283 UNIMPLEMENTED(); |
| 1284 } |
| 1285 |
| 1286 |
1263 Representation StoreIndexedInstr::RequiredInputRepresentation( | 1287 Representation StoreIndexedInstr::RequiredInputRepresentation( |
1264 intptr_t idx) const { | 1288 intptr_t idx) const { |
1265 // Array can be a Dart object or a pointer to external data. | 1289 // Array can be a Dart object or a pointer to external data. |
1266 if (idx == 0) return kNoRepresentation; // Flexible input representation. | 1290 if (idx == 0) return kNoRepresentation; // Flexible input representation. |
1267 if (idx == 1) return kTagged; // Index is a smi. | 1291 if (idx == 1) return kTagged; // Index is a smi. |
1268 ASSERT(idx == 2); | 1292 ASSERT(idx == 2); |
1269 switch (class_id_) { | 1293 switch (class_id_) { |
1270 case kArrayCid: | 1294 case kArrayCid: |
1271 case kOneByteStringCid: | 1295 case kOneByteStringCid: |
1272 case kTypedDataInt8ArrayCid: | 1296 case kTypedDataInt8ArrayCid: |
(...skipping 2377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3650 } else if (kind() == MathUnaryInstr::kDoubleSquare) { | 3674 } else if (kind() == MathUnaryInstr::kDoubleSquare) { |
3651 DRegister val = locs()->in(0).fpu_reg(); | 3675 DRegister val = locs()->in(0).fpu_reg(); |
3652 DRegister result = locs()->out(0).fpu_reg(); | 3676 DRegister result = locs()->out(0).fpu_reg(); |
3653 __ muld(result, val, val); | 3677 __ muld(result, val, val); |
3654 } else { | 3678 } else { |
3655 __ CallRuntime(TargetFunction(), InputCount()); | 3679 __ CallRuntime(TargetFunction(), InputCount()); |
3656 } | 3680 } |
3657 } | 3681 } |
3658 | 3682 |
3659 | 3683 |
| 3684 LocationSummary* CaseInsensitiveCompareUC16Instr::MakeLocationSummary( |
| 3685 Isolate* isolate, bool opt) const { |
| 3686 UNIMPLEMENTED(); |
| 3687 return NULL; |
| 3688 } |
| 3689 |
| 3690 |
| 3691 void CaseInsensitiveCompareUC16Instr::EmitNativeCode( |
| 3692 FlowGraphCompiler* compiler) { |
| 3693 UNIMPLEMENTED(); |
| 3694 } |
| 3695 |
| 3696 |
3660 LocationSummary* MathMinMaxInstr::MakeLocationSummary(Isolate* isolate, | 3697 LocationSummary* MathMinMaxInstr::MakeLocationSummary(Isolate* isolate, |
3661 bool opt) const { | 3698 bool opt) const { |
3662 if (result_cid() == kDoubleCid) { | 3699 if (result_cid() == kDoubleCid) { |
3663 const intptr_t kNumInputs = 2; | 3700 const intptr_t kNumInputs = 2; |
3664 const intptr_t kNumTemps = 1; | 3701 const intptr_t kNumTemps = 1; |
3665 LocationSummary* summary = new(isolate) LocationSummary( | 3702 LocationSummary* summary = new(isolate) LocationSummary( |
3666 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3703 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
3667 summary->set_in(0, Location::RequiresFpuRegister()); | 3704 summary->set_in(0, Location::RequiresFpuRegister()); |
3668 summary->set_in(1, Location::RequiresFpuRegister()); | 3705 summary->set_in(1, Location::RequiresFpuRegister()); |
3669 // Reuse the left register so that code can be made shorter. | 3706 // Reuse the left register so that code can be made shorter. |
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4740 } | 4777 } |
4741 | 4778 |
4742 | 4779 |
4743 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4780 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4744 if (!compiler->CanFallThroughTo(normal_entry())) { | 4781 if (!compiler->CanFallThroughTo(normal_entry())) { |
4745 __ b(compiler->GetJumpLabel(normal_entry())); | 4782 __ b(compiler->GetJumpLabel(normal_entry())); |
4746 } | 4783 } |
4747 } | 4784 } |
4748 | 4785 |
4749 | 4786 |
| 4787 void IndirectEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4788 UNIMPLEMENTED(); |
| 4789 } |
| 4790 |
| 4791 |
4750 LocationSummary* GotoInstr::MakeLocationSummary(Isolate* isolate, | 4792 LocationSummary* GotoInstr::MakeLocationSummary(Isolate* isolate, |
4751 bool opt) const { | 4793 bool opt) const { |
4752 return new(isolate) LocationSummary(isolate, 0, 0, LocationSummary::kNoCall); | 4794 return new(isolate) LocationSummary(isolate, 0, 0, LocationSummary::kNoCall); |
4753 } | 4795 } |
4754 | 4796 |
4755 | 4797 |
4756 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4798 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4757 __ TraceSimMsg("GotoInstr"); | 4799 __ TraceSimMsg("GotoInstr"); |
4758 if (!compiler->is_optimizing()) { | 4800 if (!compiler->is_optimizing()) { |
4759 if (FLAG_emit_edge_counters) { | 4801 if (FLAG_emit_edge_counters) { |
(...skipping 13 matching lines...) Expand all Loading... |
4773 } | 4815 } |
4774 | 4816 |
4775 // We can fall through if the successor is the next block in the list. | 4817 // We can fall through if the successor is the next block in the list. |
4776 // Otherwise, we need a jump. | 4818 // Otherwise, we need a jump. |
4777 if (!compiler->CanFallThroughTo(successor())) { | 4819 if (!compiler->CanFallThroughTo(successor())) { |
4778 __ b(compiler->GetJumpLabel(successor())); | 4820 __ b(compiler->GetJumpLabel(successor())); |
4779 } | 4821 } |
4780 } | 4822 } |
4781 | 4823 |
4782 | 4824 |
| 4825 LocationSummary* IndirectGotoInstr::MakeLocationSummary(Isolate* isolate, |
| 4826 bool opt) const { |
| 4827 const intptr_t kNumInputs = 1; |
| 4828 const intptr_t kNumTemps = 1; |
| 4829 |
| 4830 LocationSummary* locs = new(isolate) LocationSummary( |
| 4831 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 4832 |
| 4833 locs->set_in(0, Location::RequiresRegister()); |
| 4834 locs->set_temp(0, Location::RequiresRegister()); |
| 4835 |
| 4836 return locs; |
| 4837 } |
| 4838 |
| 4839 |
| 4840 void IndirectGotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4841 // TODO(jgruber): Implement. |
| 4842 UNIMPLEMENTED(); |
| 4843 } |
| 4844 |
| 4845 |
4783 LocationSummary* CurrentContextInstr::MakeLocationSummary(Isolate* isolate, | 4846 LocationSummary* CurrentContextInstr::MakeLocationSummary(Isolate* isolate, |
4784 bool opt) const { | 4847 bool opt) const { |
4785 return LocationSummary::Make(isolate, | 4848 return LocationSummary::Make(isolate, |
4786 0, | 4849 0, |
4787 Location::RequiresRegister(), | 4850 Location::RequiresRegister(), |
4788 LocationSummary::kNoCall); | 4851 LocationSummary::kNoCall); |
4789 } | 4852 } |
4790 | 4853 |
4791 | 4854 |
4792 void CurrentContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4855 void CurrentContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4926 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); | 4989 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); |
4927 #if defined(DEBUG) | 4990 #if defined(DEBUG) |
4928 __ LoadImmediate(S4, kInvalidObjectPointer); | 4991 __ LoadImmediate(S4, kInvalidObjectPointer); |
4929 __ LoadImmediate(S5, kInvalidObjectPointer); | 4992 __ LoadImmediate(S5, kInvalidObjectPointer); |
4930 #endif | 4993 #endif |
4931 } | 4994 } |
4932 | 4995 |
4933 } // namespace dart | 4996 } // namespace dart |
4934 | 4997 |
4935 #endif // defined TARGET_ARCH_MIPS | 4998 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |