Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Side by Side Diff: runtime/vm/intermediate_language_mips.cc

Issue 513213002: Generate some intrinsics using our IR. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 81 }
82 82
83 83
84 // Attempt optimized compilation at return instruction instead of at the entry. 84 // Attempt optimized compilation at return instruction instead of at the entry.
85 // The entry needs to be patchable, no inlined objects are allowed in the area 85 // The entry needs to be patchable, no inlined objects are allowed in the area
86 // that will be overwritten by the patch instructions: a branch macro sequence. 86 // that will be overwritten by the patch instructions: a branch macro sequence.
87 void ReturnInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 87 void ReturnInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
88 __ TraceSimMsg("ReturnInstr"); 88 __ TraceSimMsg("ReturnInstr");
89 Register result = locs()->in(0).reg(); 89 Register result = locs()->in(0).reg();
90 ASSERT(result == V0); 90 ASSERT(result == V0);
91
92 if (is_intrinsic_) {
93 // Intrinsics don't have a frame.
94 __ Ret();
95 return;
96 }
97
98
91 #if defined(DEBUG) 99 #if defined(DEBUG)
92 Label stack_ok; 100 Label stack_ok;
93 __ Comment("Stack Check"); 101 __ Comment("Stack Check");
94 __ TraceSimMsg("Stack Check"); 102 __ TraceSimMsg("Stack Check");
95 const intptr_t fp_sp_dist = 103 const intptr_t fp_sp_dist =
96 (kFirstLocalSlotFromFp + 1 - compiler->StackSize()) * kWordSize; 104 (kFirstLocalSlotFromFp + 1 - compiler->StackSize()) * kWordSize;
97 ASSERT(fp_sp_dist <= 0); 105 ASSERT(fp_sp_dist <= 0);
98 __ subu(CMPRES1, SP, FP); 106 __ subu(CMPRES1, SP, FP);
99 107
100 __ BranchEqual(CMPRES1, fp_sp_dist, &stack_ok); 108 __ BranchEqual(CMPRES1, fp_sp_dist, &stack_ok);
(...skipping 4710 matching lines...) Expand 10 before | Expand all | Expand 10 after
4811 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); 4819 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
4812 #if defined(DEBUG) 4820 #if defined(DEBUG)
4813 __ LoadImmediate(S4, kInvalidObjectPointer); 4821 __ LoadImmediate(S4, kInvalidObjectPointer);
4814 __ LoadImmediate(S5, kInvalidObjectPointer); 4822 __ LoadImmediate(S5, kInvalidObjectPointer);
4815 #endif 4823 #endif
4816 } 4824 }
4817 4825
4818 } // namespace dart 4826 } // namespace dart
4819 4827
4820 #endif // defined TARGET_ARCH_MIPS 4828 #endif // defined TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698